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

Unified Diff: gclient_scm.py

Issue 3132004: Ignore unversioned files when switching a repository. (Closed)
Patch Set: Created 10 years, 4 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_scm.py
diff --git a/gclient_scm.py b/gclient_scm.py
index 925789db6717a454fa757f93bcc484b58665a576..532fabc82eeb9509acefe02811fd6981851efdc7 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -793,11 +793,14 @@ class SVNWrapper(SCMWrapper):
from_info['Repository Root'],
to_info['Repository Root'])
else:
- if scm.SVN.CaptureStatus(checkout_path) and not options.force:
- raise gclient_utils.Error("Can't switch the checkout to %s; UUID "
- "don't match and there is local changes "
- "in %s. Delete the directory and "
- "try again." % (url, checkout_path))
+ if not options.force:
+ # Look for local modifications but ignore unversioned files.
+ for status in scm.SVN.CaptureStatus(checkout_path):
+ if status[0] != '?':
+ raise gclient_utils.Error(
+ ('Can\'t switch the checkout to %s; UUID don\'t match and '
+ 'there is local changes in %s. Delete the directory and '
+ 'try again.') % (url, checkout_path))
# Ok delete it.
print("\n_____ switching %s to a new checkout" % self.relpath)
gclient_utils.RemoveDirectory(checkout_path)
« 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