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

Unified Diff: gclient.py

Issue 249021: gclient: fix to support reading .gclient_entries in old list format (Closed)
Patch Set: use isinstanceof Created 11 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient.py
diff --git a/gclient.py b/gclient.py
index da87501c40f2a8c3e034cf1a451f69724ae5e365..96175aa172fc8a4f7f76c95fa59b9b487c8a0bf7 100755
--- a/gclient.py
+++ b/gclient.py
@@ -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):
M-A Ruel 2009/09/28 18:49:08 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. "
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698