#!/usr/bin/env perl # Task: output list of 'opened' files, using local pathnames. # # status: tested on Win/NT using perl 5.6 # num of calls to 'p4': 2 # room for optimization/improvement: add getopts call # # Copyright 2004 Perforce Corporation, Inc. All rights reserved. $p4 = "p4 -Ztag -u arthur -c dent.development"; require "ztag.pl"; #----------------------------------------------------------- %info = readInfo(); $cl_root = $info{"Client root"}; $cl_name = $info{"Client name"}; #----------------------------------------------------------- $client_tagged_cmd = "$p4 opened"; @ret = readinZtag($client_tagged_cmd); # do a substitute on the 'clientFile' field, # mapping from //myclientname/xx/yy to # /xx/yy $oldtag = "//$cl_name/"; foreach $o (@ret) { $localFile = $o->{'clientFile'}; $localFile =~ s/$oldtag/$cl_root/; print "$localFile\n"; }