Change 16414 by gsar@onru on 2002/05/05 08:41:22

        p4genpatch diffs against depot files from //depot/perl when called
        with -b //depot/maint-5.6/perl

Affected files ...

.... //depot/perl/Porting/p4genpatch#6 edit

Differences ...

==== //depot/perl/Porting/p4genpatch#6 (text) ====
Index: perl/Porting/p4genpatch
--- perl/Porting/p4genpatch#5~16413~    Sun May  5 00:00:00 2002
+++ perl/Porting/p4genpatch     Sun May  5 00:00:00 2002
@@ -53,16 +53,18 @@
   $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";
End of Patch.

Reply via email to