Update add-package.pl
authorJos I. Boumans <kane@dwim.org>
Thu, 4 Oct 2007 11:24:05 +0000 (13:24 +0200)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Fri, 5 Oct 2007 08:09:58 +0000 (08:09 +0000)
From: "Jos I. Boumans" <jos@dwim.org>
Message-Id: <9D8CA217-8B5B-487E-96A4-92D9047FE921@dwim.org>

p4raw-id: //depot/perl@32030

Porting/add-package.pl

index db4c531..b403bca 100644 (file)
@@ -407,14 +407,20 @@ my @NewFiles;
 if( $RunDiff ) {
     my $diff = $Repo; $diff =~ s/$$/patch/;
 
-    print "Generating diff..." if $Verbose;
-
     ### weird RV ;(
     my $master = basename( $MasterRepo );
     my $repo   = basename( $Repo );
     my $chdir  = dirname( $MasterRepo );
 
-    system( "cd $chdir; diff -ruN $master $repo > $diff" );
+    ### the .patch file is added by an rsync from the APC
+    ### but isn't actually in the p4 repo, so exclude it
+    my $cmd = "cd $chdir; diff -ruN --exclude=.patch $master $repo > $diff";
+
+    print "Running: '$cmd'\n";
+
+    print "Generating diff..." if $Verbose;
+
+    system( $cmd );
         #and die "Could not write diff to '$diff': $?";
     die "Could not write diff to '$diff'" unless -e $diff && -s _;