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

Unified Diff: gclient_scm.py

Issue 1163403003: Update .git/objects/info/alternates when upstream url changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 5 years, 6 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 cf19e350d9627c98f20f03c875509ce8c1e65c0c..9baa6f48cabaacf99bc9183940cb1a580354aff4 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -452,6 +452,11 @@ class GitWrapper(SCMWrapper):
self._CheckClean(rev_str)
# Switch over to the new upstream
self._Run(['remote', 'set-url', self.remote, url], options)
+ if mirror:
+ with open(os.path.join(
+ self.checkout_path, '.git', 'objects', 'info', 'alternates'),
+ 'w') as fh:
+ fh.write(os.path.join(url, 'objects'))
self._FetchAndReset(revision, file_list, options)
return_early = True
« 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