Index: gclient_scm.py |
diff --git a/gclient_scm.py b/gclient_scm.py |
index 473a1bde81224395e8cb0e2adc619f3533099f2c..4bcc4b7ffc59c855a5985b25c47c75fa5d996193 100644 |
--- a/gclient_scm.py |
+++ b/gclient_scm.py |
@@ -717,7 +717,14 @@ class GitWrapper(SCMWrapper): |
deps_revision = default_rev |
if deps_revision.startswith('refs/heads/'): |
deps_revision = deps_revision.replace('refs/heads/', self.remote + '/') |
- deps_revision = self.GetUsableRev(deps_revision, options) |
+ try: |
+ deps_revision = self.GetUsableRev(deps_revision, options) |
+ except gclient_utils.Error as e: |
+ # If the DEPS entry's url and hash changed, try to update the origin. |
+ # See also http://crbug.com/520067. |
+ if 'safesync_url response "%s"' % deps_revision in e.message: |
nodir
2015/08/12 17:04:26
Define a new exception class and raise it in lines
tandrii(chromium)
2015/08/12 17:17:33
Good idea, I was just lazy. Done.
|
+ return self.update(options, [], file_list) |
+ raise |
if file_list is not None: |
files = self._Capture(['diff', deps_revision, '--name-only']).split() |