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

Unified Diff: gclient_scm.py

Issue 244253007: Fix gclient to correctly check out remote refs during update. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Fix comment Created 6 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: gclient_scm.py
diff --git a/gclient_scm.py b/gclient_scm.py
index c0b4a325e9262c49df14e7d4c5356a7de430f2c6..54e550e25522fd82494661b921b1b435ab17d913 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -341,8 +341,8 @@ class GitWrapper(SCMWrapper):
if revision.startswith('refs/'):
rev_type = "branch"
elif revision.startswith(self.remote + '/'):
- # For compatibility with old naming, translate 'origin' to 'refs/heads'
- revision = revision.replace(self.remote + '/', 'refs/heads/')
+ # Rewrite remote refs to their local equivalents.
+ revision = 'refs/remotes/' + revision
rev_type = "branch"
else:
# hash is also a tag, only make a distinction at checkout
« 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