@ -693,7 +693,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
GitDependency (
GitDependency (
parent = self ,
parent = self ,
name = name ,
name = name ,
# Update URL with parent dep's protocol
# Update URL with scheme in protocol_override
url = GitDependency . updateProtocol ( url , self . protocol ) ,
url = GitDependency . updateProtocol ( url , self . protocol ) ,
managed = True ,
managed = True ,
custom_deps = None ,
custom_deps = None ,
@ -1446,14 +1446,6 @@ solutions = %(solution_list)s
self . _cipd_root = None
self . _cipd_root = None
self . config_content = None
self . config_content = None
@staticmethod
def _getScheme ( url ) :
""" Returns the scheme part of the given URL """
if not url or not re . match ( ' ^([a-z]+):// ' , url ) :
return None
return url . split ( ' :// ' ) [ 0 ]
def _CheckConfig ( self ) :
def _CheckConfig ( self ) :
""" Verify that the config matches the state of the existing checked-out
""" Verify that the config matches the state of the existing checked-out
solutions . """
solutions . """
@ -1536,7 +1528,9 @@ it or fix the checkout.
deps_to_add . append ( GitDependency (
deps_to_add . append ( GitDependency (
parent = self ,
parent = self ,
name = s [ ' name ' ] ,
name = s [ ' name ' ] ,
url = s [ ' url ' ] ,
# Update URL with scheme in protocol_override
url = GitDependency . updateProtocol (
s [ ' url ' ] , s . get ( ' protocol_override ' , None ) ) ,
managed = s . get ( ' managed ' , True ) ,
managed = s . get ( ' managed ' , True ) ,
custom_deps = s . get ( ' custom_deps ' , { } ) ,
custom_deps = s . get ( ' custom_deps ' , { } ) ,
custom_vars = s . get ( ' custom_vars ' , { } ) ,
custom_vars = s . get ( ' custom_vars ' , { } ) ,
@ -1547,8 +1541,8 @@ it or fix the checkout.
relative = None ,
relative = None ,
condition = None ,
condition = None ,
print_outbuf = True ,
print_outbuf = True ,
# Pass p arent URL p rotocol down the tree for child deps to use.
# Pass p rotocol_override down the tree for child deps to use.
protocol = GClient. _getScheme ( s [ ' url ' ] ) ) )
protocol = s. get ( ' protocol_override ' , None ) ) )
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 )
@ -1777,7 +1771,7 @@ it or fix the checkout.
GitDependency (
GitDependency (
parent = self ,
parent = self ,
name = entry ,
name = entry ,
# Update URL with parent dep's protocol
# Update URL with scheme in protocol_override
url = GitDependency . updateProtocol ( prev_url , self . protocol ) ,
url = GitDependency . updateProtocol ( prev_url , self . protocol ) ,
managed = False ,
managed = False ,
custom_deps = { } ,
custom_deps = { } ,