Commit a98a6cd4 authored by agable's avatar agable Committed by Commit bot

Remove safesync support from gclient[_scm].py

R=dpranke@chromium.org

Review-Url: https://codereview.chromium.org/2395013002
parent 8d11e482
...@@ -18,7 +18,6 @@ class Breakpad(config_util.Config): ...@@ -18,7 +18,6 @@ class Breakpad(config_util.Config):
'url': url, 'url': url,
'managed': False, 'managed': False,
'custom_deps': {}, 'custom_deps': {},
'safesync_url': '',
} }
spec = { spec = {
'solutions': [solution], 'solutions': [solution],
......
...@@ -20,7 +20,6 @@ class Chromium(config_util.Config): ...@@ -20,7 +20,6 @@ class Chromium(config_util.Config):
'deps_file': '.DEPS.git', 'deps_file': '.DEPS.git',
'managed' : False, 'managed' : False,
'custom_deps': {}, 'custom_deps': {},
'safesync_url': '',
} }
if props.get('webkit_revision', '') == 'ToT': if props.get('webkit_revision', '') == 'ToT':
solution['custom_vars'] = {'webkit_revision': ''} solution['custom_vars'] = {'webkit_revision': ''}
......
...@@ -21,7 +21,6 @@ class Dart(config_util.Config): ...@@ -21,7 +21,6 @@ class Dart(config_util.Config):
'deps_file': 'DEPS', 'deps_file': 'DEPS',
'managed' : False, 'managed' : False,
'custom_deps': {}, 'custom_deps': {},
'safesync_url': '',
} }
spec = { spec = {
'solutions': [solution], 'solutions': [solution],
......
...@@ -20,7 +20,6 @@ class Dartino(config_util.Config): ...@@ -20,7 +20,6 @@ class Dartino(config_util.Config):
'deps_file': 'DEPS', 'deps_file': 'DEPS',
'managed' : False, 'managed' : False,
'custom_deps': {}, 'custom_deps': {},
'safesync_url': '',
} }
spec = { spec = {
'solutions': [solution], 'solutions': [solution],
......
...@@ -21,7 +21,6 @@ class Dart(config_util.Config): ...@@ -21,7 +21,6 @@ class Dart(config_util.Config):
'deps_file': 'tools/deps/dartium.deps/DEPS', 'deps_file': 'tools/deps/dartium.deps/DEPS',
'managed' : False, 'managed' : False,
'custom_deps': {}, 'custom_deps': {},
'safesync_url': '',
} }
spec = { spec = {
'solutions': [solution], 'solutions': [solution],
......
...@@ -19,7 +19,6 @@ class Chromium(config_util.Config): ...@@ -19,7 +19,6 @@ class Chromium(config_util.Config):
'url' : url, 'url' : url,
'managed' : False, 'managed' : False,
'custom_deps': {}, 'custom_deps': {},
'safesync_url': '',
} }
spec = { spec = {
'solutions': [solution], 'solutions': [solution],
......
...@@ -20,7 +20,6 @@ class IOSInternal(config_util.Config): ...@@ -20,7 +20,6 @@ class IOSInternal(config_util.Config):
'deps_file': 'DEPS', 'deps_file': 'DEPS',
'managed' : False, 'managed' : False,
'custom_deps': {}, 'custom_deps': {},
'safesync_url': '',
} }
spec = { spec = {
'solutions': [solution], 'solutions': [solution],
......
...@@ -21,7 +21,6 @@ class Mojo(config_util.Config): ...@@ -21,7 +21,6 @@ class Mojo(config_util.Config):
'deps_file': 'DEPS', 'deps_file': 'DEPS',
'managed' : False, 'managed' : False,
'custom_deps': {}, 'custom_deps': {},
'safesync_url': '',
} }
spec = { spec = {
'solutions': [solution], 'solutions': [solution],
......
...@@ -22,7 +22,6 @@ class NaCl(config_util.Config): ...@@ -22,7 +22,6 @@ class NaCl(config_util.Config):
'deps_file' : 'DEPS', 'deps_file' : 'DEPS',
'managed' : False, 'managed' : False,
'custom_deps' : {}, 'custom_deps' : {},
'safesync_url': '',
} }
spec = { spec = {
'solutions': [solution], 'solutions': [solution],
......
...@@ -21,7 +21,6 @@ class Naclports(config_util.Config): ...@@ -21,7 +21,6 @@ class Naclports(config_util.Config):
'deps_file' : 'DEPS', 'deps_file' : 'DEPS',
'managed' : False, 'managed' : False,
'custom_deps' : {}, 'custom_deps' : {},
'safesync_url': '',
} }
spec = { spec = {
'solutions': [solution], 'solutions': [solution],
......
...@@ -21,7 +21,6 @@ class V8(config_util.Config): ...@@ -21,7 +21,6 @@ class V8(config_util.Config):
'deps_file' : 'DEPS', 'deps_file' : 'DEPS',
'managed' : False, 'managed' : False,
'custom_deps' : {}, 'custom_deps' : {},
'safesync_url': '',
} }
spec = { spec = {
'solutions': [solution], 'solutions': [solution],
......
...@@ -23,7 +23,6 @@ class WebRTC(config_util.Config): ...@@ -23,7 +23,6 @@ class WebRTC(config_util.Config):
'deps_file': 'DEPS', 'deps_file': 'DEPS',
'managed': False, 'managed': False,
'custom_deps': {}, 'custom_deps': {},
'safesync_url': '',
}, },
], ],
'with_branch_heads': True, 'with_branch_heads': True,
......
...@@ -190,13 +190,12 @@ class GClientKeywords(object): ...@@ -190,13 +190,12 @@ class GClientKeywords(object):
class DependencySettings(GClientKeywords): class DependencySettings(GClientKeywords):
"""Immutable configuration settings.""" """Immutable configuration settings."""
def __init__( def __init__(
self, parent, url, safesync_url, managed, custom_deps, custom_vars, self, parent, url, managed, custom_deps, custom_vars,
custom_hooks, deps_file, should_process, relative): custom_hooks, deps_file, should_process, relative):
GClientKeywords.__init__(self) GClientKeywords.__init__(self)
# These are not mutable: # These are not mutable:
self._parent = parent self._parent = parent
self._safesync_url = safesync_url
self._deps_file = deps_file self._deps_file = deps_file
self._url = url self._url = url
# 'managed' determines whether or not this dependency is synced/updated by # 'managed' determines whether or not this dependency is synced/updated by
...@@ -254,10 +253,6 @@ class DependencySettings(GClientKeywords): ...@@ -254,10 +253,6 @@ class DependencySettings(GClientKeywords):
return self or GClient(None, None) return self or GClient(None, None)
return self.parent.root return self.parent.root
@property
def safesync_url(self):
return self._safesync_url
@property @property
def should_process(self): def should_process(self):
"""True if this dependency should be processed, i.e. checked out.""" """True if this dependency should be processed, i.e. checked out."""
...@@ -297,12 +292,12 @@ class DependencySettings(GClientKeywords): ...@@ -297,12 +292,12 @@ class DependencySettings(GClientKeywords):
class Dependency(gclient_utils.WorkItem, DependencySettings): class Dependency(gclient_utils.WorkItem, DependencySettings):
"""Object that represents a dependency checkout.""" """Object that represents a dependency checkout."""
def __init__(self, parent, name, url, safesync_url, managed, custom_deps, def __init__(self, parent, name, url, managed, custom_deps,
custom_vars, custom_hooks, deps_file, should_process, custom_vars, custom_hooks, deps_file, should_process,
relative): relative):
gclient_utils.WorkItem.__init__(self, name) gclient_utils.WorkItem.__init__(self, name)
DependencySettings.__init__( DependencySettings.__init__(
self, parent, url, safesync_url, managed, custom_deps, custom_vars, self, parent, url, managed, custom_deps, custom_vars,
custom_hooks, deps_file, should_process, relative) custom_hooks, deps_file, should_process, relative)
# This is in both .gclient and DEPS files: # This is in both .gclient and DEPS files:
...@@ -703,7 +698,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings): ...@@ -703,7 +698,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
if ent is not None: if ent is not None:
deps_file = ent['deps_file'] deps_file = ent['deps_file']
deps_to_add.append(Dependency( deps_to_add.append(Dependency(
self, name, url, None, None, None, self.custom_vars, None, self, name, url, None, None, self.custom_vars, None,
deps_file, should_process, use_relative_paths)) deps_file, should_process, use_relative_paths))
deps_to_add.sort(key=lambda x: x.name) deps_to_add.sort(key=lambda x: x.name)
...@@ -1059,7 +1054,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings): ...@@ -1059,7 +1054,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
def __str__(self): def __str__(self):
out = [] out = []
for i in ('name', 'url', 'parsed_url', 'safesync_url', 'custom_deps', for i in ('name', 'url', 'parsed_url', 'custom_deps',
'custom_vars', 'deps_hooks', 'file_list', 'should_process', 'custom_vars', 'deps_hooks', 'file_list', 'should_process',
'processed', 'hooks_ran', 'deps_parsed', 'requirements', 'processed', 'hooks_ran', 'deps_parsed', 'requirements',
'allowed_hosts'): 'allowed_hosts'):
...@@ -1114,7 +1109,6 @@ solutions = [ ...@@ -1114,7 +1109,6 @@ solutions = [
"managed" : %(managed)s, "managed" : %(managed)s,
"custom_deps" : { "custom_deps" : {
}, },
"safesync_url": "%(safesync_url)s",
}, },
] ]
cache_dir = %(cache_dir)r cache_dir = %(cache_dir)r
...@@ -1127,7 +1121,6 @@ cache_dir = %(cache_dir)r ...@@ -1127,7 +1121,6 @@ cache_dir = %(cache_dir)r
"managed" : %(managed)s, "managed" : %(managed)s,
"custom_deps" : { "custom_deps" : {
%(solution_deps)s }, %(solution_deps)s },
"safesync_url": "%(safesync_url)s",
}, },
""") """)
...@@ -1141,7 +1134,7 @@ solutions = [ ...@@ -1141,7 +1134,7 @@ solutions = [
# Do not change previous behavior. Only solution level and immediate DEPS # Do not change previous behavior. Only solution level and immediate DEPS
# are processed. # are processed.
self._recursion_limit = 2 self._recursion_limit = 2
Dependency.__init__(self, None, None, None, None, True, None, None, None, Dependency.__init__(self, None, None, None, True, None, None, None,
'unused', True, None) 'unused', True, None)
self._options = options self._options = options
if options.deps_os: if options.deps_os:
...@@ -1225,7 +1218,6 @@ it or fix the checkout. ...@@ -1225,7 +1218,6 @@ it or fix the checkout.
try: try:
deps_to_add.append(Dependency( deps_to_add.append(Dependency(
self, s['name'], s['url'], self, s['name'], s['url'],
s.get('safesync_url', None),
s.get('managed', True), s.get('managed', True),
s.get('custom_deps', {}), s.get('custom_deps', {}),
s.get('custom_vars', {}), s.get('custom_vars', {}),
...@@ -1276,12 +1268,11 @@ it or fix the checkout. ...@@ -1276,12 +1268,11 @@ it or fix the checkout.
return client return client
def SetDefaultConfig(self, solution_name, deps_file, solution_url, def SetDefaultConfig(self, solution_name, deps_file, solution_url,
safesync_url, managed=True, cache_dir=None): managed=True, cache_dir=None):
self.SetConfig(self.DEFAULT_CLIENT_FILE_TEXT % { self.SetConfig(self.DEFAULT_CLIENT_FILE_TEXT % {
'solution_name': solution_name, 'solution_name': solution_name,
'solution_url': solution_url, 'solution_url': solution_url,
'deps_file': deps_file, 'deps_file': deps_file,
'safesync_url' : safesync_url,
'managed': managed, 'managed': managed,
'cache_dir': cache_dir, 'cache_dir': cache_dir,
}) })
...@@ -1324,13 +1315,10 @@ it or fix the checkout. ...@@ -1324,13 +1315,10 @@ it or fix the checkout.
revision_overrides = {} revision_overrides = {}
if self._options.head: if self._options.head:
return revision_overrides return revision_overrides
# Do not check safesync_url if one or more --revision flag is specified.
if not self._options.revisions: if not self._options.revisions:
for s in self.dependencies: for s in self.dependencies:
if not s.managed: if not s.managed:
self._options.revisions.append('%s@unmanaged' % s.name) self._options.revisions.append('%s@unmanaged' % s.name)
elif s.safesync_url:
self._ApplySafeSyncRev(dep=s)
if not self._options.revisions: if not self._options.revisions:
return revision_overrides return revision_overrides
solutions_names = [s.name for s in self.dependencies] solutions_names = [s.name for s in self.dependencies]
...@@ -1344,26 +1332,6 @@ it or fix the checkout. ...@@ -1344,26 +1332,6 @@ it or fix the checkout.
index += 1 index += 1
return revision_overrides return revision_overrides
def _ApplySafeSyncRev(self, dep):
"""Finds a valid revision from the content of the safesync_url and apply it
by appending revisions to the revision list. Throws if revision appears to
be invalid for the given |dep|."""
assert len(dep.safesync_url) > 0
handle = urllib.urlopen(dep.safesync_url)
rev = handle.read().strip()
handle.close()
if not rev:
raise gclient_utils.Error(
'It appears your safesync_url (%s) is not working properly\n'
'(as it returned an empty response). Check your config.' %
dep.safesync_url)
scm = gclient_scm.CreateSCM(
dep.url, dep.root.root_dir, dep.name, self.outbuf)
safe_rev = scm.GetUsableRev(rev, self._options)
if self._options.verbose:
print('Using safesync_url revision: %s.\n' % safe_rev)
self._options.revisions.append('%s@%s' % (dep.name, safe_rev))
def RunOnDeps(self, command, args, ignore_requirements=False, progress=True): def RunOnDeps(self, command, args, ignore_requirements=False, progress=True):
"""Runs a command on each dependency in a client and its dependencies. """Runs a command on each dependency in a client and its dependencies.
...@@ -1539,7 +1507,6 @@ it or fix the checkout. ...@@ -1539,7 +1507,6 @@ it or fix the checkout.
'solution_name': d.name, 'solution_name': d.name,
'solution_url': d.url, 'solution_url': d.url,
'deps_file': d.deps_file, 'deps_file': d.deps_file,
'safesync_url' : d.safesync_url or '',
'managed': d.managed, 'managed': d.managed,
'solution_deps': ''.join(custom_deps), 'solution_deps': ''.join(custom_deps),
} }
...@@ -1705,7 +1672,7 @@ def CMDroot(parser, args): ...@@ -1705,7 +1672,7 @@ def CMDroot(parser, args):
print(os.path.abspath('.')) print(os.path.abspath('.'))
@subcommand.usage('[url] [safesync url]') @subcommand.usage('[url]')
def CMDconfig(parser, args): def CMDconfig(parser, args):
"""Creates a .gclient file in the current directory. """Creates a .gclient file in the current directory.
...@@ -1764,10 +1731,7 @@ def CMDconfig(parser, args): ...@@ -1764,10 +1731,7 @@ def CMDconfig(parser, args):
parser.error('Do not include relative path components in --name.') parser.error('Do not include relative path components in --name.')
deps_file = options.deps_file deps_file = options.deps_file
safesync_url = '' client.SetDefaultConfig(name, deps_file, base_url,
if len(args) > 1:
safesync_url = args[1]
client.SetDefaultConfig(name, deps_file, base_url, safesync_url,
managed=not options.unmanaged, managed=not options.unmanaged,
cache_dir=options.cache_dir) cache_dir=options.cache_dir)
client.SaveConfig() client.SaveConfig()
...@@ -1856,8 +1820,7 @@ def CMDsync(parser, args): ...@@ -1856,8 +1820,7 @@ def CMDsync(parser, args):
'format src@rev. The src@ part is optional and can be ' 'format src@rev. The src@ part is optional and can be '
'skipped. -r can be used multiple times when .gclient ' 'skipped. -r can be used multiple times when .gclient '
'has multiple solutions configured and will work even ' 'has multiple solutions configured and will work even '
'if the src@ part is skipped. Note that specifying ' 'if the src@ part is skipped.')
'--revision means your safesync_url gets ignored.')
parser.add_option('--with_branch_heads', action='store_true', parser.add_option('--with_branch_heads', action='store_true',
help='Clone git "branch_heads" refspecs in addition to ' help='Clone git "branch_heads" refspecs in addition to '
'the default refspecs. This adds about 1/2GB to a ' 'the default refspecs. This adds about 1/2GB to a '
...@@ -1865,8 +1828,7 @@ def CMDsync(parser, args): ...@@ -1865,8 +1828,7 @@ def CMDsync(parser, args):
parser.add_option('--with_tags', action='store_true', parser.add_option('--with_tags', action='store_true',
help='Clone git tags in addition to the default refspecs.') help='Clone git tags in addition to the default refspecs.')
parser.add_option('-H', '--head', action='store_true', parser.add_option('-H', '--head', action='store_true',
help='skips any safesync_urls specified in ' help='DEPRECATED: only made sense with safesync urls.')
'configured solutions and sync to head instead')
parser.add_option('-D', '--delete_unversioned_trees', action='store_true', parser.add_option('-D', '--delete_unversioned_trees', action='store_true',
help='Deletes from the working copy any dependencies that ' help='Deletes from the working copy any dependencies that '
'have been removed since the last sync, as long as ' 'have been removed since the last sync, as long as '
......
...@@ -777,12 +777,7 @@ class GitWrapper(SCMWrapper): ...@@ -777,12 +777,7 @@ class GitWrapper(SCMWrapper):
sha1 = None sha1 = None
if not os.path.isdir(self.checkout_path): if not os.path.isdir(self.checkout_path):
raise NoUsableRevError( raise NoUsableRevError(
( 'We could not find a valid hash for safesync_url response "%s".\n' 'This is not a git repo, so we cannot get a usable rev.')
'Safesync URLs with a git checkout currently require the repo to\n'
'be cloned without a safesync_url before adding the safesync_url.\n'
'For more info, see: '
'http://code.google.com/p/chromium/wiki/UsingNewGit'
'#Initial_checkout' ) % rev)
if scm.GIT.IsValidRevision(cwd=self.checkout_path, rev=rev): if scm.GIT.IsValidRevision(cwd=self.checkout_path, rev=rev):
sha1 = rev sha1 = rev
...@@ -795,11 +790,7 @@ class GitWrapper(SCMWrapper): ...@@ -795,11 +790,7 @@ class GitWrapper(SCMWrapper):
if not sha1: if not sha1:
raise NoUsableRevError( raise NoUsableRevError(
('We could not find a valid hash for safesync_url response "%s".\n' 'Hash %s does not appear to be a valid hash in this repo.' % rev)
'Please ensure that your safesync_url provides git sha1 hashes.\n'
'For more info, see:\n'
'http://code.google.com/p/chromium/wiki/UsingNewGit#Initial_checkout'
) % rev)
return sha1 return sha1
......
...@@ -133,8 +133,6 @@ class GclientApi(recipe_api.RecipeApi): ...@@ -133,8 +133,6 @@ class GclientApi(recipe_api.RecipeApi):
revisions = [] revisions = []
self.set_patch_project_revision(self.m.properties.get('patch_project'), cfg) self.set_patch_project_revision(self.m.properties.get('patch_project'), cfg)
for i, s in enumerate(cfg.solutions): for i, s in enumerate(cfg.solutions):
if s.safesync_url: # pragma: no cover
continue # prefer safesync_url in gclient mode
if i == 0 and s.revision is None: if i == 0 and s.revision is None:
s.revision = RevisionFallbackChain() s.revision = RevisionFallbackChain()
......
...@@ -207,7 +207,6 @@ class GClientSmoke(GClientSmokeBase): ...@@ -207,7 +207,6 @@ class GClientSmoke(GClientSmokeBase):
' "managed" : True,\n' ' "managed" : True,\n'
' "custom_deps" : {\n' ' "custom_deps" : {\n'
' },\n' ' },\n'
' "safesync_url": "",\n'
' },\n' ' },\n'
']\n' ']\n'
'cache_dir = None\n') % self.git_base) 'cache_dir = None\n') % self.git_base)
...@@ -220,7 +219,6 @@ class GClientSmoke(GClientSmokeBase): ...@@ -220,7 +219,6 @@ class GClientSmoke(GClientSmokeBase):
' "managed" : True,\n' ' "managed" : True,\n'
' "custom_deps" : {\n' ' "custom_deps" : {\n'
' },\n' ' },\n'
' "safesync_url": "",\n'
' },\n' ' },\n'
']\n' ']\n'
'cache_dir = None\n') % self.git_base) 'cache_dir = None\n') % self.git_base)
...@@ -233,7 +231,6 @@ class GClientSmoke(GClientSmokeBase): ...@@ -233,7 +231,6 @@ class GClientSmoke(GClientSmokeBase):
' "managed" : True,\n' ' "managed" : True,\n'
' "custom_deps" : {\n' ' "custom_deps" : {\n'
' },\n' ' },\n'
' "safesync_url": "faa",\n'
' },\n' ' },\n'
']\n' ']\n'
'cache_dir = None\n') 'cache_dir = None\n')
...@@ -246,7 +243,6 @@ class GClientSmoke(GClientSmokeBase): ...@@ -246,7 +243,6 @@ class GClientSmoke(GClientSmokeBase):
' "managed" : True,\n' ' "managed" : True,\n'
' "custom_deps" : {\n' ' "custom_deps" : {\n'
' },\n' ' },\n'
' "safesync_url": "",\n'
' },\n' ' },\n'
']\n' ']\n'
'cache_dir = None\n') 'cache_dir = None\n')
...@@ -255,7 +251,7 @@ class GClientSmoke(GClientSmokeBase): ...@@ -255,7 +251,7 @@ class GClientSmoke(GClientSmokeBase):
os.remove(p) os.remove(p)
results = self.gclient(['config', 'foo', 'faa', 'fuu']) results = self.gclient(['config', 'foo', 'faa', 'fuu'])
err = ('Usage: gclient.py config [options] [url] [safesync url]\n\n' err = ('Usage: gclient.py config [options] [url]\n\n'
'gclient.py: error: Inconsistent arguments. Use either --spec or one' 'gclient.py: error: Inconsistent arguments. Use either --spec or one'
' or 2 args\n') ' or 2 args\n')
self.check(('', err, 2), results) self.check(('', err, 2), results)
...@@ -307,7 +303,6 @@ class GClientSmokeGIT(GClientSmokeBase): ...@@ -307,7 +303,6 @@ class GClientSmokeGIT(GClientSmokeBase):
def testSync(self): def testSync(self):
if not self.enabled: if not self.enabled:
return return
# TODO(maruel): safesync.
self.gclient(['config', self.git_base + 'repo_1', '--name', 'src']) self.gclient(['config', self.git_base + 'repo_1', '--name', 'src'])
# Test unversioned checkout. # Test unversioned checkout.
self.parseGclient( self.parseGclient(
...@@ -387,7 +382,6 @@ class GClientSmokeGIT(GClientSmokeBase): ...@@ -387,7 +382,6 @@ class GClientSmokeGIT(GClientSmokeBase):
def testSyncJobs(self): def testSyncJobs(self):
if not self.enabled: if not self.enabled:
return return
# TODO(maruel): safesync.
self.gclient(['config', self.git_base + 'repo_1', '--name', 'src']) self.gclient(['config', self.git_base + 'repo_1', '--name', 'src'])
# Test unversioned checkout. # Test unversioned checkout.
self.parseGclient( self.parseGclient(
......
...@@ -219,7 +219,7 @@ class GclientTest(trial_dir.TestCase): ...@@ -219,7 +219,7 @@ class GclientTest(trial_dir.TestCase):
# Invalid urls causes pain when specifying requirements. Make sure it's # Invalid urls causes pain when specifying requirements. Make sure it's
# auto-fixed. # auto-fixed.
d = gclient.Dependency( d = gclient.Dependency(
None, 'name', 'proto://host/path/@revision', None, None, None, None, None, 'name', 'proto://host/path/@revision', None, None, None,
None, '', True, False) None, '', True, False)
self.assertEquals('proto://host/path@revision', d.url) self.assertEquals('proto://host/path@revision', d.url)
...@@ -230,19 +230,19 @@ class GclientTest(trial_dir.TestCase): ...@@ -230,19 +230,19 @@ class GclientTest(trial_dir.TestCase):
obj.add_dependencies_and_close( obj.add_dependencies_and_close(
[ [
gclient.Dependency( gclient.Dependency(
obj, 'foo', 'url', None, None, None, None, None, 'DEPS', True, False), obj, 'foo', 'url', None, None, None, None, 'DEPS', True, False),
gclient.Dependency( gclient.Dependency(
obj, 'bar', 'url', None, None, None, None, None, 'DEPS', True, False), obj, 'bar', 'url', None, None, None, None, 'DEPS', True, False),
], ],
[]) [])
obj.dependencies[0].add_dependencies_and_close( obj.dependencies[0].add_dependencies_and_close(
[ [
gclient.Dependency( gclient.Dependency(
obj.dependencies[0], 'foo/dir1', 'url', None, None, None, None, obj.dependencies[0], 'foo/dir1', 'url', None, None, None,
None, 'DEPS', True, False), None, 'DEPS', True, False),
gclient.Dependency( gclient.Dependency(
obj.dependencies[0], 'foo/dir2', obj.dependencies[0], 'foo/dir2',
gclient.GClientKeywords.FromImpl('bar'), None, None, None, None, gclient.GClientKeywords.FromImpl('bar'), None, None, None,
None, 'DEPS', True, False), None, 'DEPS', True, False),
], ],
[]) [])
...@@ -563,7 +563,7 @@ class GclientTest(trial_dir.TestCase): ...@@ -563,7 +563,7 @@ class GclientTest(trial_dir.TestCase):
"""Verifies expected behavior of LateOverride.""" """Verifies expected behavior of LateOverride."""
url = "git@github.com:dart-lang/spark.git" url = "git@github.com:dart-lang/spark.git"
d = gclient.Dependency(None, 'name', 'url', d = gclient.Dependency(None, 'name', 'url',
None, None, None, None, None, '', True, False) None, None, None, None, '', True, False)
late_url = d.LateOverride(url) late_url = d.LateOverride(url)
self.assertEquals(url, late_url) self.assertEquals(url, late_url)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment