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

Unified Diff: gclient_scm.py

Issue 334343002: If managed=False, don't fetch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 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 | tests/gclient_scm_test.py » ('j') | 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 26d96585cc667c0b7fd54a62372171e1c732b7e1..1b50abee9c402ed74349cf2e13329f1d42f5aeb2 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -356,6 +356,13 @@ class GitWrapper(SCMWrapper):
verbose = ['--verbose']
printed_path = True
+ if not managed:
+ self.Print('________ unmanaged solution; skipping %s' % self.relpath)
+ try:
+ return self._Capture(['rev-parse', '--verify', 'HEAD'])
+ except subprocess2.CalledProcessError:
+ return None
+
url = self._CreateOrUpdateCache(url, options)
if revision.startswith('refs/'):
@@ -389,11 +396,6 @@ class GitWrapper(SCMWrapper):
self.Print('')
return self._Capture(['rev-parse', '--verify', 'HEAD'])
- if not managed:
- self._UpdateBranchHeads(options, fetch=False)
- self.Print('________ unmanaged solution; skipping %s' % self.relpath)
- return self._Capture(['rev-parse', '--verify', 'HEAD'])
-
# See if the url has changed (the unittests use git://foo for the url, let
# that through).
current_url = self._Capture(['config', 'remote.%s.url' % self.remote])
« no previous file with comments | « no previous file | tests/gclient_scm_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698