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
experimental/szager/collated-output
maruel@chromium.org 15 years ago
parent 90a685ef1a
commit 04dd7deb6b

@ -735,6 +735,9 @@ solutions = [
# delete_unversioned_trees is set to true. # delete_unversioned_trees is set to true.
entries = [i.name for i in self.tree(False)] entries = [i.name for i in self.tree(False)]
for entry, prev_url in self._ReadEntries().iteritems(): 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. # Fix path separator on Windows.
entry_fixed = entry.replace('/', os.path.sep) entry_fixed = entry.replace('/', os.path.sep)
e_dir = os.path.join(self.root_dir(), entry_fixed) e_dir = os.path.join(self.root_dir(), entry_fixed)

Loading…
Cancel
Save