Skip to content
Permalink
Browse files
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):

Canonical link: https://commits.webkit.org/174809@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Dana Burkart committed Apr 18, 2016
1 parent 9cae403 commit a6271bc3898ecc19e9adfc7e6a7eb7644dff42a6
Showing with 22 additions and 2 deletions.
  1. +13 −0 Tools/ChangeLog
  2. +9 −2 Tools/Scripts/svn-apply
@@ -1,3 +1,16 @@
2016-04-18 Dana Burkart <dburkart@apple.com>

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 <cgarcia@igalia.com>

Pending API Request URL is wrong after reloading
@@ -90,16 +90,18 @@ my $merge = 0;
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 @@ sub patch($)
$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") {

0 comments on commit a6271bc

Please sign in to comment.