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

Unified Diff: gclient.py

Issue 159788: Fix output on Windows when gclient warns the user about a stale directory. (Closed)
Patch Set: Created 11 years, 5 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 8c5db08da30206785e132409a4da62a74ff3b3cc..231a9640e910971b47580d367a6dda07fd9d2243 100755
--- a/gclient.py
+++ b/gclient.py
@@ -1378,18 +1378,23 @@ class GClient(object):
# delete_unversioned_trees is set to true.
prev_entries = self._ReadEntries()
for entry in prev_entries:
- e_dir = os.path.join(self._root_dir, entry)
+ # Fix path separator on Windows.
+ entry_fixed = entry.replace('/', os.path.sep)
+ 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):
if not self._options.delete_unversioned_trees or \
CaptureSVNStatus(e_dir):
- # There are modified files in this entry
- entries[entry] = None # Keep warning until removed.
- print("\nWARNING: \"%s\" is no longer part of this client. "
- "It is recommended that you manually remove it.\n") % entry
+ # There are modified files in this entry. Keep warning until
+ # removed.
+ entries[entry] = None
+ print(("\nWARNING: \"%s\" is no longer part of this client. "
+ "It is recommended that you manually remove it.\n") %
+ entry_fixed)
else:
# Delete the entry
print("\n________ deleting \'%s\' " +
- "in \'%s\'") % (entry, self._root_dir)
+ "in \'%s\'") % (entry_fixed, self._root_dir)
RemoveDirectory(e_dir)
# record the current list of entries for next time
self._SaveEntries(entries)
« 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