PYTHON=c:/python20/python PERL=d:/perl/bin/perl RUBY=c:/ruby/bin/ruby tests: p4opened findnocompress oldclients difflabel p4unknown p4opened: $(PYTHON) p4opened.py $(PERL) p4opened.pl $(PERL) p4opened.p4perl $(RUBY) p4opened.rb difflabel: $(PYTHON) difflabel.py --label1 rel1label --label2 rel2label $(PERL) difflabel.pl --label1 rel1label --label2 rel2label $(PERL) difflabel.p4perl --label1 rel1label --label2 rel2label $(RUBY) difflabel.rb --label1 rel1label --label2 rel2label findnocompress: $(PYTHON) findnocompress.py $(PERL) findnocompress.pl $(PERL) findnocompress.p4perl $(RUBY) findnocompress.rb oldclients: $(PYTHON) oldclients.py $(PERL) oldclients.pl $(PERL) oldclients.p4perl $(RUBY) oldclients.rb p4unknown: $(PYTHON) p4unknown.py $(PERL) p4unknown.pl $(PERL) p4unknown.p4perl $(RUBY) p4unknown.rb # Copyright 2004 Perforce Corporation, Inc. All rights reserved.
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 4312 | Jeff Bowles |
Adding a number of example scripts that show how to get to Perforce data for a variety of scripting languages and variety of simple tasks. Note that Perl/Python/Ruby (and variants) are included, but shell/batch/DCL/applescript are not. (Am trying to stick with somewhat-portable approaches, to make comparisons easier.) Each program is written in the following languages/configurations: 1. Perl, calling "p4 -Ztag" for data 2. Perl, calling Tony Smith's "P4Perl" module 3. Python, calling "p4 -G" for data 4. Ruby, calling "p4 -R" for data 5. Ruby, calling Tony Smith's "P4Ruby" module The programs do the following: a. compare client specs to users (find old clients) b. compare two labels c. determine which client specs use compression. d. determine which files need to be "p4 add'ed." e. output list of 'opened' files, using local pathnames. |