Title: [175717] trunk/Tools
- Revision
- 175717
- Author
- matthew_han...@apple.com
- Date
- 2014-11-06 14:41:31 -0800 (Thu, 06 Nov 2014)
Log Message
Remove code that prepends a leading 'r' to the first argument of _run_git_svn_find_rev
https://bugs.webkit.org/show_bug.cgi?id=138475
Reviewed by Ryosuke Niwa.
The change in https://trac.webkit.org/175603 introduced broke compatibility with svn_revision_from_git_commit.
This patch reverts the part of that change that broke compatibility. In addition, this patch adds a comment to
explain that SVN revisions require a leading 'r', moves an existing comment to a more appropriate location and
renames the positional argument to better reflect that it can represent either an SVN revision or a Git tree-ish.
* Scripts/webkitpy/common/checkout/scm/git.py:
(Git._run_git_svn_find_rev):
Add comment mentioning that svn_revisions need to begin with 'r'.
Move comment (explaining that git svn find-rev exits with code 0 when no match is found) to a more appropriate location.
Rename the argument 'revision' to 'revision_or_treeish' to reflect the dual form that argument can take.
Remove code that coerced the revision/treeish into a string and prepended an 'r'.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (175716 => 175717)
--- trunk/Tools/ChangeLog 2014-11-06 22:23:16 UTC (rev 175716)
+++ trunk/Tools/ChangeLog 2014-11-06 22:41:31 UTC (rev 175717)
@@ -1,3 +1,22 @@
+2014-11-06 Matthew Hanson <matthew_han...@apple.com>
+
+ Remove code that prepends a leading 'r' to the first argument of _run_git_svn_find_rev
+ https://bugs.webkit.org/show_bug.cgi?id=138475
+
+ Reviewed by Ryosuke Niwa.
+
+ The change in https://trac.webkit.org/175603 introduced broke compatibility with svn_revision_from_git_commit.
+ This patch reverts the part of that change that broke compatibility. In addition, this patch adds a comment to
+ explain that SVN revisions require a leading 'r', moves an existing comment to a more appropriate location and
+ renames the positional argument to better reflect that it can represent either an SVN revision or a Git tree-ish.
+
+ * Scripts/webkitpy/common/checkout/scm/git.py:
+ (Git._run_git_svn_find_rev):
+ Add comment mentioning that svn_revisions need to begin with 'r'.
+ Move comment (explaining that git svn find-rev exits with code 0 when no match is found) to a more appropriate location.
+ Rename the argument 'revision' to 'revision_or_treeish' to reflect the dual form that argument can take.
+ Remove code that coerced the revision/treeish into a string and prepended an 'r'.
+
2014-11-06 Carlos Garcia Campos <cgar...@igalia.com>
[GTK] Add context menu API to Web Process Extensions
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py (175716 => 175717)
--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py 2014-11-06 22:23:16 UTC (rev 175716)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py 2014-11-06 22:41:31 UTC (rev 175717)
@@ -323,16 +323,13 @@
command += changed_files
return self.prepend_svn_revision(self.run(command, decode_output=False, cwd=self.checkout_root))
- def _run_git_svn_find_rev(self, revision, branch=None):
- revision = str(revision)
- if revision and revision[0] != 'r':
- revision = 'r' + revision
-
- # git svn find-rev always exits 0, even when the revision or commit is not found.
- command = ['svn', 'find-rev', revision]
+ def _run_git_svn_find_rev(self, revision_or_treeish, branch=None):
+ # git svn find-rev requires SVN revisions to begin with the character 'r'.
+ command = ['svn', 'find-rev', revision_or_treeish]
if branch:
command.append(branch)
+ # git svn find-rev always exits 0, even when the revision or commit is not found.
return self._run_git(command).rstrip()
def _string_to_int_or_none(self, string):
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes