mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Remove gclient cleanup command
R=maruel@chromium.org BUG=641588 Review-Url: https://codereview.chromium.org/2401483002
This commit is contained in:
18
gclient.py
18
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.
|
||||
|
||||
@@ -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])]
|
||||
|
||||
@@ -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']))
|
||||
|
||||
Reference in New Issue
Block a user