Commit 86f0f95e authored by maruel@chromium.org's avatar maruel@chromium.org

Ignore unversioned files when switching a repository.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@55573 0039d316-1c4b-4281-b951-d872f2087c98
parent 0d81244c
......@@ -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)
......
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