summaryrefslogtreecommitdiff
path: root/Porting/p4genpatch
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2002-05-05 08:41:22 +0000
committerGurusamy Sarathy <gsar@cpan.org>2002-05-05 08:41:22 +0000
commit4e3fb1fa4fee118c59049f595d780cb8655c399e (patch)
tree7aefea03ea4c869578560f2e291b1b66ae5e5d0a /Porting/p4genpatch
parent8d7ecf559b96045e46d06fc0db835f68131c173e (diff)
downloadperl-4e3fb1fa4fee118c59049f595d780cb8655c399e.tar.gz
p4genpatch diffs against depot files from //depot/perl when called
with -b //depot/maint-5.6/perl p4raw-id: //depot/perl@16414
Diffstat (limited to 'Porting/p4genpatch')
-rw-r--r--Porting/p4genpatch4
1 files changed, 3 insertions, 1 deletions
diff --git a/Porting/p4genpatch b/Porting/p4genpatch
index f9a1f4dae6..3b0bae352d 100644
--- a/Porting/p4genpatch
+++ b/Porting/p4genpatch
@@ -53,16 +53,18 @@ for my $a (@action) {
$tempdir ||= tempdir( "tmp-XXXX", CLEANUP => 1, TMPDIR => 1 );
my($action,$file,$prefix) = @$a;
my($path,$basename,$number) = $file =~ m|\Q$prefix\E/(.+/)?([^/]+)#(\d+)|;
+ my($prevfile) = $file =~ m|^(.+)#\d+\z|;
die "Panic: Could not parse file[$file]" unless $number;
$path = "" unless defined $path;
my($d1,$d2,$prev);
$prev = $number-1;
+ $prevfile .= "#$prev";
if ($prev==0 or $action =~ /^(add|branch)$/) {
$d1 = "/dev/null";
} elsif ($action =~ /^(edit|integrate)$/) {
$d1 = "$path$basename#$prev";
warn "==> $d1 <==\n" if $OPT{v};
- my $system = "p4 @P4opt print -o $tempdir/$d1 //depot/$path$basename#$prev";
+ my $system = "p4 @P4opt print -o $tempdir/$d1 $prevfile";
my $status = `$system`;
if ($?) {
warn "$0: system[$system] failed, status[$?]\n";