Index: tests/gclient_scm_test.py |
diff --git a/tests/gclient_scm_test.py b/tests/gclient_scm_test.py |
index 8768404156af973f48c6ff454e1dfe8e2e3bc958..c49b5247e449bc82be3499de94c9564c442ae5ff 100755 |
--- a/tests/gclient_scm_test.py |
+++ b/tests/gclient_scm_test.py |
@@ -233,9 +233,6 @@ |
gclient_scm.scm.SVN.CaptureStatus( |
None, self.base_path, no_ignore=False).AndReturn([]) |
gclient_scm.os.path.isdir(self.base_path).AndReturn(True) |
- gclient_scm.gclient_utils.CheckCallAndFilterAndHeader(['svn', |
- 'cleanup', self.base_path], |
- always=True, cwd=self.base_path) |
gclient_scm.scm.SVN.RunAndGetFileList( |
options.verbose, |
['update', '--revision', 'BASE', '--ignore-externals'], |
@@ -257,9 +254,6 @@ |
] |
gclient_scm.scm.SVN.CaptureStatus( |
None, self.base_path, no_ignore=False).AndReturn(items) |
- gclient_scm.gclient_utils.CheckCallAndFilterAndHeader(['svn', |
- 'cleanup', self.base_path], |
- always=True, cwd=self.base_path) |
file_path = join(self.base_path, 'a') |
gclient_scm.os.path.exists(file_path).AndReturn(True) |
gclient_scm.os.path.isfile(file_path).AndReturn(False) |
@@ -299,9 +293,6 @@ |
gclient_scm.gclient_utils.rmtree(file_path) |
# pylint: disable=E1120 |
gclient_scm.os.path.isdir(self.base_path).AndReturn(False) |
- gclient_scm.gclient_utils.CheckCallAndFilterAndHeader(['svn', |
- 'cleanup', self.base_path], |
- always=True, cwd=self.base_path) |
gclient_scm.SVNWrapper.update(options, [], ['.']) |
self.mox.ReplayAll() |
@@ -376,6 +367,9 @@ |
dotted_path = join(self.base_path, '.') |
gclient_scm.scm.SVN._CaptureInfo([], dotted_path).AndReturn(file_info) |
+ # Verify no locked files. |
+ gclient_scm.scm.SVN.CaptureStatus(None, dotted_path).AndReturn([]) |
+ |
# Cheat a bit here. |
gclient_scm.scm.SVN._CaptureInfo([file_info['URL']], None |
).AndReturn(file_info) |
@@ -392,9 +386,6 @@ |
additional_args = ['--revision', str(file_info['Revision'])] |
additional_args.extend(['--force', '--ignore-externals']) |
files_list = [] |
- gclient_scm.gclient_utils.CheckCallAndFilterAndHeader(['svn', |
- 'cleanup', self.base_path], |
- always=True, cwd=self.base_path) |
gclient_scm.scm.SVN.RunAndGetFileList( |
options.verbose, |
['update', self.base_path] + additional_args, |
@@ -424,15 +415,14 @@ |
gclient_scm.scm.SVN._CaptureInfo([], dotted_path).AndReturn(file_info) |
# Create an untracked file and directory. |
+ gclient_scm.scm.SVN.CaptureStatus(None, dotted_path |
+ ).AndReturn([['? ', 'dir'], ['? ', 'file']]) |
+ |
gclient_scm.scm.SVN._CaptureInfo([file_info['URL']], None |
).AndReturn(file_info) |
gclient_scm.scm.SVN._CaptureInfo([], self.base_path+'/.' |
).AndReturn({'Revision': 100}) |
- |
- gclient_scm.gclient_utils.CheckCallAndFilterAndHeader(['svn', |
- 'cleanup', self.base_path], |
- always=True, cwd=self.base_path) |
self.mox.ReplayAll() |
files_list = [] |
@@ -452,27 +442,25 @@ |
'UUID': 'ABC', |
'Revision': 42, |
} |
- |
gclient_scm.os.path.exists(join(self.base_path, '.hg')).AndReturn(False) |
self.mox.StubOutWithMock(gclient_scm.scm.GIT, 'IsGitSvn', True) |
gclient_scm.scm.GIT.IsGitSvn(self.base_path).AndReturn(False) |
gclient_scm.os.path.exists(self.base_path).AndReturn(True) |
- gclient_scm.gclient_utils.CheckCallAndFilterAndHeader(['svn', |
- 'cleanup', self.base_path], |
- always=True, cwd=self.base_path) |
- |
# Checkout or update. |
dotted_path = join(self.base_path, '.') |
gclient_scm.scm.SVN._CaptureInfo([], dotted_path).AndReturn(file_info) |
+ # Create an untracked file and directory. |
+ gclient_scm.scm.SVN.CaptureStatus(None, dotted_path |
+ ).AndReturn([['? ', 'dir'], ['? ', 'file']]) |
+ |
gclient_scm.scm.SVN._CaptureInfo([file_info['URL']], None |
).AndReturn(file_info) |
# Confirm that the untracked file is removed. |
gclient_scm.scm.SVN.CaptureStatus(None, self.base_path |
).AndReturn([['? ', 'dir'], ['? ', 'file']]) |
- |
gclient_scm.os.path.isdir(join(self.base_path, 'dir')).AndReturn(True) |
gclient_scm.os.path.isdir(join(self.base_path, 'file')).AndReturn(False) |
gclient_scm.os.path.islink(join(self.base_path, 'dir')).AndReturn(False) |
@@ -504,7 +492,9 @@ |
gclient_scm.os.path.exists(join(self.base_path, '.svn')).AndReturn(False) |
gclient_scm.os.path.exists(join(self.base_path, 'DEPS')).AndReturn(False) |
+ # Verify no locked files. |
dotted_path = join(self.base_path, '.') |
+ gclient_scm.scm.SVN.CaptureStatus(None, dotted_path).AndReturn([]) |
# When checking out a single file, we issue an svn checkout and svn update. |
files_list = self.mox.CreateMockAnything() |
@@ -512,9 +502,6 @@ |
['svn', 'checkout', '--depth', 'empty', self.url, self.base_path], |
always=True, |
cwd=self.root_dir) |
- gclient_scm.gclient_utils.CheckCallAndFilterAndHeader(['svn', |
- 'cleanup', self.base_path], |
- always=True, cwd=self.base_path) |
gclient_scm.scm.SVN.RunAndGetFileList( |
options.verbose, |
['update', 'DEPS', '--ignore-externals'], |
@@ -576,17 +563,16 @@ |
gclient_scm.os.path.exists(join(self.base_path, 'DEPS')).AndReturn(True) |
gclient_scm.os.remove(join(self.base_path, 'DEPS')) |
+ # Verify no locked files. |
+ gclient_scm.scm.SVN.CaptureStatus( |
+ None, join(self.base_path, '.')).AndReturn([]) |
+ |
# When checking out a single file, we issue an svn checkout and svn update. |
files_list = self.mox.CreateMockAnything() |
gclient_scm.gclient_utils.CheckCallAndFilterAndHeader( |
['svn', 'checkout', '--depth', 'empty', self.url, self.base_path], |
always=True, |
cwd=self.root_dir) |
- |
- gclient_scm.gclient_utils.CheckCallAndFilterAndHeader(['svn', |
- 'cleanup', self.base_path], |
- always=True, cwd=self.base_path) |
- |
gclient_scm.scm.SVN.RunAndGetFileList( |
options.verbose, |
['update', 'DEPS', '--ignore-externals'], |
@@ -625,9 +611,9 @@ |
).AndReturn('1.5.1') |
gclient_scm.os.path.exists(join(self.base_path, '.svn')).AndReturn(True) |
- gclient_scm.gclient_utils.CheckCallAndFilterAndHeader(['svn', |
- 'cleanup', self.base_path], |
- always=True, cwd=self.base_path) |
+ # Verify no locked files. |
+ gclient_scm.scm.SVN.CaptureStatus(None, join(self.base_path, '.') |
+ ).AndReturn([]) |
# Now we fall back on scm.update(). |
files_list = self.mox.CreateMockAnything() |