Commit 8301701a authored by msb@chromium.org's avatar msb@chromium.org

gclient: fix to support reading .gclient_entries in old list format

Review URL: http://codereview.chromium.org/249021

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@27386 0039d316-1c4b-4281-b951-d872f2087c98
parent 2e38de7b
......@@ -746,11 +746,17 @@ class GClient(object):
e_dir = os.path.join(self._root_dir, entry_fixed)
# Use entry and not entry_fixed there.
if entry not in entries and os.path.exists(e_dir):
file_list = []
scm = gclient_scm.CreateSCM(prev_entries[entry], self._root_dir,
entry_fixed)
scm.status(self._options, [], file_list)
if not self._options.delete_unversioned_trees or file_list:
modified_files = False
if isinstance(prev_entries,list):
# old .gclient_entries format was list, now dict
modified_files = gclient_scm.CaptureSVNStatus(e_dir)
else:
file_list = []
scm = gclient_scm.CreateSCM(prev_entries[entry], self._root_dir,
entry_fixed)
scm.status(self._options, [], file_list)
modified_files = file_list != []
if not self._options.delete_unversioned_trees or modified_files:
# There are modified files in this entry. Keep warning until
# removed.
print(("\nWARNING: \"%s\" is no longer part of this client. "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment