From 4e3fb1fa4fee118c59049f595d780cb8655c399e Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Sun, 5 May 2002 08:41:22 +0000 Subject: p4genpatch diffs against depot files from //depot/perl when called with -b //depot/maint-5.6/perl p4raw-id: //depot/perl@16414 --- Porting/p4genpatch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Porting') 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"; -- cgit v1.2.1