# Task: determine which client specs use compression. # # num of calls to 'p4': 1 # status: tested on Darwin Mac OS X using "p4 -R" # # room for optimization/improvement: add getopts call # # Copyright 2004 Perforce Corporation, Inc. All rights reserved. require "readp4marshal" p4 = P4Marshal.new #----------------------------------------------------------- # only call to P4: 'p4 clients' #----------------------------------------------------------- clientList = p4.run("clients") clientList.each { |c| optionList = c['Options'] if optionList =~ /nocompress/ puts "#{c['client']}: *no* compression of data" else puts "#{c['client']}: compression of data (default)" end }