Change 16394 by jhi@alpha on 2002/05/04 16:09:15
Allow p4genpatch to use diff programs other than 'diff'.
Affected files ...
.... //depot/perl/Porting/p4genpatch#2 edit
Differences ...
==== //depot/perl/Porting/p4genpatch#2 (text) ====
Index: perl/Porting/p4genpatch
--- perl/Porting/p4genpatch.~1~ Sat May 4 10:15:05 2002
+++ perl/Porting/p4genpatch Sat May 4 10:15:05 2002
@@ -18,10 +18,10 @@
my $VERSION = '0.03';
$0 =~ s|^.*/||;
our(%OPT, @P4opt);
-%OPT = ( "d" => "u", b => "//depot/perl/" );
+%OPT = ( "d" => "u", b => "//depot/perl/", "D" => "diff" );
use Getopt::Long;
Getopt::Long::Configure("no_ignore_case");
-GetOptions(\%OPT, "b=s", "p=s", "d=s", "h", "v", "V") or die Usage;
+GetOptions(\%OPT, "b=s", "p=s", "d=s", "D=s", "h", "v", "V") or die Usage;
print Usage and exit if $OPT{h};
print "$VERSION\n" and exit if $OPT{V};
die Usage unless @ARGV == 1;
@@ -90,7 +90,7 @@
my @filelog = `p4 @P4opt filelog $file`;
correctmtime(\@filelog,$prev,"$tempdir/$d1");
correctmtime(\@filelog,$number,"$tempdir/$d2");
- $system = "cd $tempdir && diff -$OPT{d} '$d1' '$d2'";
+ $system = "cd $tempdir && $OPT{D} -$OPT{d} '$d1' '$d2'";
system($system); # no return check because diff doesn't always return 0
}
for ("$tempdir/$d1","$tempdir/$d2") {
@@ -127,6 +127,7 @@
-p host:port p4 port (e.g. myhost:1666)
-d diffopt option to pass to diff(1)
+ -D diff diff(1) to use
-b branch(es) which branches to include (regex)
(default: //depot/perl/)
-v verbose
End of Patch.