Title: [199674] trunk/Tools
Revision
199674
Author
[email protected]
Date
2016-04-18 10:13:04 -0700 (Mon, 18 Apr 2016)

Log Message

svn-apply: add option for ignoring changes to ChangeLog files
https://bugs.webkit.org/show_bug.cgi?id=156618

Reviewed by Darin Adler.

This change adds a new option to svn-apply, --skip-changelogs, which short-circuits out of
patch() if the file in question is a ChangeLog.

* Scripts/svn-apply:
(patch):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (199673 => 199674)


--- trunk/Tools/ChangeLog	2016-04-18 16:45:35 UTC (rev 199673)
+++ trunk/Tools/ChangeLog	2016-04-18 17:13:04 UTC (rev 199674)
@@ -1,3 +1,16 @@
+2016-04-18  Dana Burkart  <[email protected]>
+
+        svn-apply: add option for ignoring changes to ChangeLog files
+        https://bugs.webkit.org/show_bug.cgi?id=156618
+
+        Reviewed by Darin Adler.
+
+        This change adds a new option to svn-apply, --skip-changelogs, which short-circuits out of
+        patch() if the file in question is a ChangeLog.
+
+        * Scripts/svn-apply:
+        (patch):
+
 2016-04-18  Carlos Garcia Campos  <[email protected]>
 
         Pending API Request URL is wrong after reloading

Modified: trunk/Tools/Scripts/svn-apply (199673 => 199674)


--- trunk/Tools/Scripts/svn-apply	2016-04-18 16:45:35 UTC (rev 199673)
+++ trunk/Tools/Scripts/svn-apply	2016-04-18 17:13:04 UTC (rev 199674)
@@ -90,16 +90,18 @@
 my $showHelp = 0;
 my $reviewer;
 my $force = 0;
+my $skipChangeLogs = 0;
 
 my $optionParseSuccess = GetOptions(
     "merge!" => \$merge,
     "help!" => \$showHelp,
     "reviewer=s" => \$reviewer,
-    "force!" => \$force
+    "force!" => \$force,
+    "skip-changelogs" => \$skipChangeLogs
 );
 
 if (!$optionParseSuccess || $showHelp) {
-    print STDERR basename($0) . " [-h|--help] [--force] [-m|--merge] [-r|--reviewer name] patch1 [patch2 ...]\n";
+    print STDERR basename($0) . " [-h|--help] [--force] [-m|--merge] [-r|--reviewer name] [--skip-changelogs] patch1 [patch2 ...]\n";
     exit 1;
 }
 
@@ -332,6 +334,11 @@
     $addition = 1 if ($diffHashRef->{isNew} || $patch =~ /\n@@ -0,0 .* @@/);
     $deletion = 1 if ($diffHashRef->{isDeletion} || $patch =~ /\n@@ .* \+0,0 @@/);
 
+    if (basename($fullPath) eq "ChangeLog" && $skipChangeLogs) {
+        print "Skipping '$fullPath' since --skip-changelogs was passed on the command line.";
+        return;
+    }
+
     if (!$addition && !$deletion && !$isBinary && $hasTextChunks) {
         # Standard patch, patch tool can handle this.
         if (basename($fullPath) eq "ChangeLog") {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to