Fix "No SCM found for url None" error that can occur after update
This occurs when gclient compares the cached deps in .gclient_entries
to the new DEPS and tries to construct an SCM for any cached entries
which no longer exist. In this situation gclient doesn't account for
the case where previous entries may have been ignored by setting their
url to None via the custom_deps section in .gclient.
Contributed by Jay Soffian.
Review URL: http://codereview.chromium.org/3769002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@62540 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gclient.py b/gclient.py
index 989a1c4..6482efa 100644
--- a/gclient.py
+++ b/gclient.py
@@ -735,6 +735,9 @@
# delete_unversioned_trees is set to true.
entries = [i.name for i in self.tree(False)]
for entry, prev_url in self._ReadEntries().iteritems():
+ if not prev_url:
+ # entry must have been overridden via .gclient custom_deps
+ continue
# Fix path separator on Windows.
entry_fixed = entry.replace('/', os.path.sep)
e_dir = os.path.join(self.root_dir(), entry_fixed)