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

Unified Diff: scm.py

Issue 1745009: Changes GetSVNBranch to prefer origin/HEAD over all others. (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 45456)
+++ scm.py (working copy)
@@ -172,9 +172,9 @@
for ref in remotes:
match = git_svn_re.search(
GIT.Capture(['cat-file', '-p', ref], cwd)[0])
- if match and match.group(1) not in svn_refs:
- # To prefer local refs over remote ones we only set the first occurence.
- # The assumption being local refs are usually first.
+ # Prefer origin/HEAD over all others.
+ if match and (match.group(1) not in svn_refs or
+ ref == "refs/remotes/origin/HEAD"):
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