|
@@ -396,8 +396,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
|
|
|
|
|
|
def __init__(self, parent, name, 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,
|
|
- should_recurse, relative, condition, protocol='https',
|
|
|
|
- print_outbuf=False):
|
|
|
|
|
|
+ should_recurse, relative, condition, print_outbuf=False):
|
|
gclient_utils.WorkItem.__init__(self, name)
|
|
gclient_utils.WorkItem.__init__(self, name)
|
|
DependencySettings.__init__(
|
|
DependencySettings.__init__(
|
|
self, parent, url, managed, custom_deps, custom_vars,
|
|
self, parent, url, managed, custom_deps, custom_vars,
|
|
@@ -463,8 +462,6 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
|
|
# dependency
|
|
# dependency
|
|
self.print_outbuf = print_outbuf
|
|
self.print_outbuf = print_outbuf
|
|
|
|
|
|
- self.protocol = protocol
|
|
|
|
-
|
|
|
|
if not self.name and self.parent:
|
|
if not self.name and self.parent:
|
|
raise gclient_utils.Error('Dependency without name')
|
|
raise gclient_utils.Error('Dependency without name')
|
|
|
|
|
|
@@ -693,8 +690,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
|
|
GitDependency(
|
|
GitDependency(
|
|
parent=self,
|
|
parent=self,
|
|
name=name,
|
|
name=name,
|
|
- # Update URL with parent dep's protocol
|
|
|
|
- url=GitDependency.updateProtocol(url, self.protocol),
|
|
|
|
|
|
+ url=url,
|
|
managed=True,
|
|
managed=True,
|
|
custom_deps=None,
|
|
custom_deps=None,
|
|
custom_vars=self.custom_vars,
|
|
custom_vars=self.custom_vars,
|
|
@@ -703,8 +699,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
|
|
should_process=should_process,
|
|
should_process=should_process,
|
|
should_recurse=name in self.recursedeps,
|
|
should_recurse=name in self.recursedeps,
|
|
relative=use_relative_paths,
|
|
relative=use_relative_paths,
|
|
- condition=condition,
|
|
|
|
- protocol=self.protocol))
|
|
|
|
|
|
+ condition=condition))
|
|
|
|
|
|
deps_to_add.sort(key=lambda x: x.name)
|
|
deps_to_add.sort(key=lambda x: x.name)
|
|
return deps_to_add
|
|
return deps_to_add
|
|
@@ -1347,16 +1342,6 @@ def _detect_host_os():
|
|
class GitDependency(Dependency):
|
|
class GitDependency(Dependency):
|
|
"""A Dependency object that represents a single git checkout."""
|
|
"""A Dependency object that represents a single git checkout."""
|
|
|
|
|
|
- @staticmethod
|
|
|
|
- def updateProtocol(url, protocol):
|
|
|
|
- """Updates given URL's protocol"""
|
|
|
|
- # only works on urls, skips local paths
|
|
|
|
- if not url or not protocol or not re.match('([a-z]+)://', url) or \
|
|
|
|
- re.match('file://', url):
|
|
|
|
- return url
|
|
|
|
-
|
|
|
|
- return re.sub('^([a-z]+):', protocol + ':', url)
|
|
|
|
-
|
|
|
|
#override
|
|
#override
|
|
def GetScmName(self):
|
|
def GetScmName(self):
|
|
"""Always 'git'."""
|
|
"""Always 'git'."""
|
|
@@ -1538,9 +1523,7 @@ it or fix the checkout.
|
|
should_recurse=True,
|
|
should_recurse=True,
|
|
relative=None,
|
|
relative=None,
|
|
condition=None,
|
|
condition=None,
|
|
- print_outbuf=True,
|
|
|
|
- # Pass parent URL protocol down the tree for child deps to use.
|
|
|
|
- protocol=s['url'].split('://')[0] if s['url'] else None))
|
|
|
|
|
|
+ print_outbuf=True))
|
|
except KeyError:
|
|
except KeyError:
|
|
raise gclient_utils.Error('Invalid .gclient file. Solution is '
|
|
raise gclient_utils.Error('Invalid .gclient file. Solution is '
|
|
'incomplete: %s' % s)
|
|
'incomplete: %s' % s)
|
|
@@ -1769,8 +1752,7 @@ it or fix the checkout.
|
|
GitDependency(
|
|
GitDependency(
|
|
parent=self,
|
|
parent=self,
|
|
name=entry,
|
|
name=entry,
|
|
- # Update URL with parent dep's protocol
|
|
|
|
- url=GitDependency.updateProtocol(prev_url, self.protocol),
|
|
|
|
|
|
+ url=prev_url,
|
|
managed=False,
|
|
managed=False,
|
|
custom_deps={},
|
|
custom_deps={},
|
|
custom_vars={},
|
|
custom_vars={},
|
|
@@ -1779,8 +1761,7 @@ it or fix the checkout.
|
|
should_process=True,
|
|
should_process=True,
|
|
should_recurse=False,
|
|
should_recurse=False,
|
|
relative=None,
|
|
relative=None,
|
|
- condition=None,
|
|
|
|
- protocol=self.protocol))
|
|
|
|
|
|
+ condition=None))
|
|
if modified_files and self._options.delete_unversioned_trees:
|
|
if modified_files and self._options.delete_unversioned_trees:
|
|
print('\nWARNING: \'%s\' is no longer part of this client.\n'
|
|
print('\nWARNING: \'%s\' is no longer part of this client.\n'
|
|
'Despite running \'gclient sync -D\' no action was taken '
|
|
'Despite running \'gclient sync -D\' no action was taken '
|