mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Remove unmaintained "gclient export" command,
introduced in http://src.chromium.org/viewvc/chrome?view=rev&revision=20990 It was intended for the tarball generation script, but there was a better and simpler way. BUG=80549 Review URL: http://codereview.chromium.org/6883263 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@83708 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
23
gclient.py
23
gclient.py
@@ -49,7 +49,7 @@ Hooks
|
|||||||
]
|
]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__version__ = "0.6.1"
|
__version__ = "0.6.2"
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
import logging
|
import logging
|
||||||
@@ -990,27 +990,6 @@ URL.
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
def CMDexport(parser, args):
|
|
||||||
"""Wrapper for svn export for all managed directories."""
|
|
||||||
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)
|
|
||||||
if len(args) != 1:
|
|
||||||
raise gclient_utils.Error('Need directory name')
|
|
||||||
client = GClient.LoadCurrentConfig(options)
|
|
||||||
|
|
||||||
if not client:
|
|
||||||
raise gclient_utils.Error('client not configured; see \'gclient config\'')
|
|
||||||
|
|
||||||
if options.verbose:
|
|
||||||
# Print out the .gclient file. This is longer than if we just printed the
|
|
||||||
# client dict, but more legible, and it might contain helpful comments.
|
|
||||||
print(client.config_content)
|
|
||||||
return client.RunOnDeps('export', args)
|
|
||||||
|
|
||||||
|
|
||||||
@attr('epilog', """Example:
|
@attr('epilog', """Example:
|
||||||
gclient pack > patch.txt
|
gclient pack > patch.txt
|
||||||
generate simple patch for configured client and dependences
|
generate simple patch for configured client and dependences
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ class SCMWrapper(object):
|
|||||||
if file_list is None:
|
if file_list is None:
|
||||||
file_list = []
|
file_list = []
|
||||||
|
|
||||||
commands = ['cleanup', 'export', 'update', 'updatesingle', 'revert',
|
commands = ['cleanup', 'update', 'updatesingle', 'revert',
|
||||||
'revinfo', 'status', 'diff', 'pack', 'runhooks']
|
'revinfo', 'status', 'diff', 'pack', 'runhooks']
|
||||||
|
|
||||||
if not command in commands:
|
if not command in commands:
|
||||||
@@ -144,19 +144,6 @@ class GitWrapper(SCMWrapper):
|
|||||||
merge_base = self._Capture(['merge-base', 'HEAD', 'origin'])
|
merge_base = self._Capture(['merge-base', 'HEAD', 'origin'])
|
||||||
self._Run(['diff', merge_base], options)
|
self._Run(['diff', merge_base], options)
|
||||||
|
|
||||||
def export(self, options, args, file_list):
|
|
||||||
"""Export a clean directory tree into the given path.
|
|
||||||
|
|
||||||
Exports into the specified directory, creating the path if it does
|
|
||||||
already exist.
|
|
||||||
"""
|
|
||||||
assert len(args) == 1
|
|
||||||
export_path = os.path.abspath(os.path.join(args[0], self.relpath))
|
|
||||||
if not os.path.exists(export_path):
|
|
||||||
os.makedirs(export_path)
|
|
||||||
self._Run(['checkout-index', '-a', '--prefix=%s/' % export_path],
|
|
||||||
options)
|
|
||||||
|
|
||||||
def pack(self, options, args, file_list):
|
def pack(self, options, args, file_list):
|
||||||
"""Generates a patch file which can be applied to the root of the
|
"""Generates a patch file which can be applied to the root of the
|
||||||
repository.
|
repository.
|
||||||
@@ -701,17 +688,6 @@ class SVNWrapper(SCMWrapper):
|
|||||||
self.checkout_path)
|
self.checkout_path)
|
||||||
self._Run(['diff'] + args, options)
|
self._Run(['diff'] + args, options)
|
||||||
|
|
||||||
def export(self, options, args, file_list):
|
|
||||||
"""Export a clean directory tree into the given path."""
|
|
||||||
assert len(args) == 1
|
|
||||||
export_path = os.path.abspath(os.path.join(args[0], self.relpath))
|
|
||||||
try:
|
|
||||||
os.makedirs(export_path)
|
|
||||||
except OSError:
|
|
||||||
pass
|
|
||||||
assert os.path.exists(export_path)
|
|
||||||
self._Run(['export', '--force', '.', export_path], options)
|
|
||||||
|
|
||||||
def pack(self, options, args, file_list):
|
def pack(self, options, args, file_list):
|
||||||
"""Generates a patch file which can be applied to the root of the
|
"""Generates a patch file which can be applied to the root of the
|
||||||
repository."""
|
repository."""
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ class SVNWrapperTestCase(BaseTestCase):
|
|||||||
def testDir(self):
|
def testDir(self):
|
||||||
members = [
|
members = [
|
||||||
'FullUrlForRelativeUrl', 'GetRevisionDate', 'RunCommand',
|
'FullUrlForRelativeUrl', 'GetRevisionDate', 'RunCommand',
|
||||||
'cleanup', 'diff', 'export', 'pack', 'relpath', 'revert',
|
'cleanup', 'diff', 'pack', 'relpath', 'revert',
|
||||||
'revinfo', 'runhooks', 'status', 'update',
|
'revinfo', 'runhooks', 'status', 'update',
|
||||||
'updatesingle', 'url',
|
'updatesingle', 'url',
|
||||||
]
|
]
|
||||||
@@ -544,7 +544,7 @@ from :3
|
|||||||
def testDir(self):
|
def testDir(self):
|
||||||
members = [
|
members = [
|
||||||
'FullUrlForRelativeUrl', 'GetRevisionDate', 'RunCommand',
|
'FullUrlForRelativeUrl', 'GetRevisionDate', 'RunCommand',
|
||||||
'cleanup', 'diff', 'export', 'pack', 'relpath', 'revert',
|
'cleanup', 'diff', 'pack', 'relpath', 'revert',
|
||||||
'revinfo', 'runhooks', 'status', 'update', 'url',
|
'revinfo', 'runhooks', 'status', 'update', 'url',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -178,7 +178,6 @@ class GClientSmoke(GClientSmokeBase):
|
|||||||
res = ('', 'Error: client not configured; see \'gclient config\'\n', 1)
|
res = ('', 'Error: client not configured; see \'gclient config\'\n', 1)
|
||||||
self.check(res, self.gclient(['cleanup']))
|
self.check(res, self.gclient(['cleanup']))
|
||||||
self.check(res, self.gclient(['diff']))
|
self.check(res, self.gclient(['diff']))
|
||||||
self.check(res, self.gclient(['export', 'foo']))
|
|
||||||
self.check(res, self.gclient(['pack']))
|
self.check(res, self.gclient(['pack']))
|
||||||
self.check(res, self.gclient(['revert']))
|
self.check(res, self.gclient(['revert']))
|
||||||
self.check(res, self.gclient(['revinfo']))
|
self.check(res, self.gclient(['revinfo']))
|
||||||
@@ -247,7 +246,6 @@ class GClientSmoke(GClientSmokeBase):
|
|||||||
self.check(('./: None\n', '', 0), results)
|
self.check(('./: None\n', '', 0), results)
|
||||||
self.check(('', '', 0), self.gclient(['cleanup']))
|
self.check(('', '', 0), self.gclient(['cleanup']))
|
||||||
self.check(('', '', 0), self.gclient(['diff']))
|
self.check(('', '', 0), self.gclient(['diff']))
|
||||||
self.check(('', '', 0), self.gclient(['export', 'foo']))
|
|
||||||
self.assertTree({})
|
self.assertTree({})
|
||||||
self.check(('', '', 0), self.gclient(['pack']))
|
self.check(('', '', 0), self.gclient(['pack']))
|
||||||
self.check(('', '', 0), self.gclient(['revert']))
|
self.check(('', '', 0), self.gclient(['revert']))
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ _values commands \
|
|||||||
cleanup \
|
cleanup \
|
||||||
config \
|
config \
|
||||||
diff \
|
diff \
|
||||||
export \
|
|
||||||
help \
|
help \
|
||||||
pack \
|
pack \
|
||||||
status \
|
status \
|
||||||
|
|||||||
Reference in New Issue
Block a user