Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: git_footers.py

Issue 552403003: Expand git-footers to read the svn position for any trunk path in any repo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_footers.py
diff --git a/git_footers.py b/git_footers.py
index b08d4648409ba0e3a404db01bec87c2650e3b44e..e426fe6c358967614a827b890442f99cc6d3d72a 100755
--- a/git_footers.py
+++ b/git_footers.py
@@ -57,7 +57,7 @@ def get_unique(footers, key):
def get_position(footers):
- """Get the chrome commit position from a footer multimap using a heuristic.
+ """Get the commit position from the footers multimap using a heuristic.
Returns:
A tuple of the branch and the position on that branch. For example,
@@ -79,8 +79,12 @@ def get_position(footers):
if svn_commit:
match = GIT_SVN_ID_PATTERN.match(svn_commit)
assert match, 'Invalid git-svn-id value: %s' % svn_commit
- if re.match('.*/chrome/trunk/src$', match.group(1)):
+ # Assume that any trunk svn revision will match the commit-position
+ # semantics.
+ if re.match('.*/trunk/.*$', match.group(1)):
return ('refs/heads/master', match.group(2))
+
+ # But for now only support faking branch-heads for chrome.
branch_match = re.match('.*/chrome/branches/([\w/-]+)/src$', match.group(1))
if branch_match:
# svn commit numbers do not map to branches.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698