From debf6c857cd6758d73bf30bde4b0b2a97bc52161 Mon Sep 17 00:00:00 2001 From: agable Date: Wed, 21 Dec 2016 12:50:12 -0800 Subject: [PATCH] Remove gclient cleanup command R=maruel@chromium.org BUG=641588 Review-Url: https://codereview.chromium.org/2401483002 --- gclient.py | 18 ------------------ gclient_scm.py | 9 +-------- tests/gclient_smoketest.py | 12 ------------ 3 files changed, 1 insertion(+), 38 deletions(-) diff --git a/gclient.py b/gclient.py index c1d7bc755..0ee95e1f3 100755 --- a/gclient.py +++ b/gclient.py @@ -1562,24 +1562,6 @@ it or fix the checkout. #### gclient commands. -def CMDcleanup(parser, args): - """DEPRECATED: SVN-only. Cleaned up all working copies. - - This is a no-op in Git. - """ - parser.add_option('--deps', dest='deps_os', metavar='OS_LIST', - help='override deps for the specified (comma-separated) ' - 'platform(s); \'all\' will process all deps_os ' - 'references') - (options, args) = parser.parse_args(args) - client = GClient.LoadCurrentConfig(options) - if not client: - raise gclient_utils.Error('client not configured; see \'gclient config\'') - if options.verbose: - client.PrintLocationAndContents() - return client.RunOnDeps('cleanup', args) - - @subcommand.usage('[command] [args ...]') def CMDrecurse(parser, args): """Operates [command args ...] on all the dependencies. diff --git a/gclient_scm.py b/gclient_scm.py index 1050e28d0..b4da53651 100644 --- a/gclient_scm.py +++ b/gclient_scm.py @@ -143,7 +143,7 @@ class SCMWrapper(object): print(*args, **kwargs) def RunCommand(self, command, options, args, file_list=None): - commands = ['cleanup', 'update', 'updatesingle', 'revert', + commands = ['update', 'updatesingle', 'revert', 'revinfo', 'status', 'diff', 'pack', 'runhooks'] if not command in commands: @@ -270,13 +270,6 @@ class GitWrapper(SCMWrapper): # time-stamp of the currently checked out revision. return self._Capture(['log', '-n', '1', '--format=%ai']) - @staticmethod - def cleanup(options, args, file_list): - """'Cleanup' the repo. - - There's no real git equivalent for the svn cleanup command, do a no-op. - """ - def diff(self, options, _args, _file_list): try: merge_base = [self._Capture(['merge-base', 'HEAD', self.remote])] diff --git a/tests/gclient_smoketest.py b/tests/gclient_smoketest.py index ffbe94c80..8d145eaa7 100755 --- a/tests/gclient_smoketest.py +++ b/tests/gclient_smoketest.py @@ -143,16 +143,6 @@ class GClientSmokeBase(fake_repos.FakeReposTestBase): self.assertEquals(len(results), len(items), (stdout, items, len(results))) return results - @staticmethod - def svnBlockCleanup(out): - """Work around svn status difference between svn 1.5 and svn 1.6 - I don't know why but on Windows they are reversed. So sorts the items.""" - for i in xrange(len(out)): - if len(out[i]) < 2: - continue - out[i] = [out[i][0]] + sorted([x[1:].strip() for x in out[i][1:]]) - return out - class GClientSmoke(GClientSmokeBase): """Doesn't require git-daemon.""" @@ -179,7 +169,6 @@ class GClientSmoke(GClientSmokeBase): def testNotConfigured(self): res = ('', 'Error: client not configured; see \'gclient config\'\n', 1) - self.check(res, self.gclient(['cleanup'])) self.check(res, self.gclient(['diff'])) self.check(res, self.gclient(['pack'])) self.check(res, self.gclient(['revert'])) @@ -265,7 +254,6 @@ class GClientSmoke(GClientSmokeBase): self.assertTree({}) results = self.gclient(['revinfo']) self.check(('./: None\n', '', 0), results) - self.check(('', '', 0), self.gclient(['cleanup'])) self.check(('', '', 0), self.gclient(['diff'])) self.assertTree({}) self.check(('', '', 0), self.gclient(['pack']))