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

Unified Diff: scm.py

Issue 1622011: Changes GetSVNBranch to prefer the first ref over the last. The... (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: Created 10 years, 8 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: scm.py
===================================================================
--- scm.py (revision 43948)
+++ scm.py (working copy)
@@ -172,7 +172,9 @@
for ref in remotes:
match = git_svn_re.search(
GIT.Capture(['cat-file', '-p', ref], cwd)[0])
- if match:
+ if match and match.group(1) not in svn_refs:
M-A Ruel 2010/04/08 16:36:38 nit: you could do instead if match: # To prefer
+ # To prefer local refs over remote ones we only set the first occurence.
+ # The assumption being local refs are usually first.
svn_refs[match.group(1)] = ref
svn_branch = ''
« 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