Revert of Run `svn cleanup` before every update and reset. (https://chromiumcodereview.appspot.com/240503007/)

Reason for revert:
It's inconclusive if this actually helped the bots, so reverting.

Original issue's description:
> Run `svn cleanup` before every update and reset.
> 
> Testing on a bot with an 'unclean' Chromium checkout:
> 
> Unpatched `gclient revert -v -v -v --nohooks --upstream` (unclean checkout)
> real    9m14.280s
> user    0m37.238s
> sys     0m37.738s
> 
> Patched 'gclient revert -v -v -v --nohooks --upstream'  (unclean checkout)
> real    5m50.065s
> user    1m18.889s
> sys     0m57.860s
> 
> ---------------- after patched gclient revert run (cleans the checkout)
> 
> Unpatched 'gclient revert -v -v -v --nohooks --upstream' (clean checkout)
> real    0m21.602s
> user    0m24.966s
> sys     0m13.969s
> 
> Patched 'gclient revert -v -v -v --nohooks --upstream' (clean checkout)
> real    0m27.467s
> user    0m28.382s
> sys     0m22.629s
> 
> BUG=336983
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=264753

TBR=dpranke@chromium.org,iannucci@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=336983

Review URL: https://codereview.chromium.org/245293003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@265093 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/tests/gclient_scm_test.py b/tests/gclient_scm_test.py
index 8768404..c49b524 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,16 +415,15 @@
     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 = []
     scm = self._scm_wrapper(url=self.url, root_dir=self.root_dir,
@@ -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()