Index: gclient.py |
=================================================================== |
--- gclient.py (revision 108803) |
+++ gclient.py (working copy) |
@@ -923,8 +923,13 @@ |
handle = urllib.urlopen(s.safesync_url) |
rev = handle.read().strip() |
handle.close() |
- if len(rev): |
- self._options.revisions.append('%s@%s' % (s.name, rev)) |
+ scm = gclient_scm.CreateSCM(s.url, s.root.root_dir, s.name) |
+ safe_rev = scm.FindSafesyncRev( |
+ cwd=scm.checkout_path, rev=rev, options=self._options) |
+ if safe_rev: |
+ if self._options.verbose: |
+ print('Using safesync_url revision: %s.\n' % safe_rev) |
+ self._options.revisions.append('%s@%s' % (s.name, safe_rev)) |
if not self._options.revisions: |
return revision_overrides |
solutions_names = [s.name for s in self.dependencies] |