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

Unified Diff: scm.py

Issue 10355014: Make checkout.*.prepare() to delete the svn:ignored files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 8 years, 8 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 | « checkout.py ('k') | tests/gclient_scm_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scm.py
diff --git a/scm.py b/scm.py
index b1b0496f4f5d1a8f666cbc88645c77a0180db926..0b617c62aaedb3ef8abdad11b86e19513336a4a1 100644
--- a/scm.py
+++ b/scm.py
@@ -621,13 +621,15 @@ class SVN(object):
return SVN.CaptureLocalInfo([], cwd).get('Revision')
@staticmethod
- def CaptureStatus(files, cwd):
+ def CaptureStatus(files, cwd, no_ignore=False):
"""Returns the svn 1.5 svn status emulated output.
@files can be a string (one file) or a list of files.
Returns an array of (status, file) tuples."""
command = ["status", "--xml"]
+ if no_ignore:
+ command.append('--no-ignore')
if not files:
pass
elif isinstance(files, basestring):
@@ -1007,7 +1009,7 @@ class SVN(object):
return (True, cls.current_version)
@staticmethod
- def Revert(cwd, callback=None, ignore_externals=False):
+ def Revert(cwd, callback=None, ignore_externals=False, no_ignore=False):
"""Reverts all svn modifications in cwd, including properties.
Deletes any modified files or directory.
@@ -1015,7 +1017,7 @@ class SVN(object):
A "svn update --revision BASE" call is required after to revive deleted
files.
"""
- for file_status in SVN.CaptureStatus(None, cwd):
+ for file_status in SVN.CaptureStatus(None, cwd, no_ignore=no_ignore):
file_path = os.path.join(cwd, file_status[1])
if (ignore_externals and
file_status[0][0] == 'X' and
« no previous file with comments | « checkout.py ('k') | tests/gclient_scm_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698