@@ -948,34 +948,33 @@ def clone(self, url, path, depth=None, protocol=None, **kwargs):
948
948
sorted_scms = sorted (sorted_scms , key = lambda (m , _ ): not m )
949
949
950
950
for _ , scm in sorted_scms :
951
- if scm .isurl (formaturl (url , 'https' )):
952
- main = True
953
- cache = self .get_cache (url )
954
-
955
- # Try to clone with cache ref first
956
- if cache :
957
- try :
958
- scm .clone (url , path , depth = depth , protocol = protocol , cache = cache , ** kwargs )
959
- main = False
960
- except ProcessException , e :
961
- if os .path .isdir (path ):
962
- rmtree_readonly (path )
963
-
964
- # Main clone routine if the clone with cache ref failed (might occur if cache ref is dirty)
965
- if main :
966
- try :
967
- scm .clone (url , path , depth = depth , protocol = protocol , ** kwargs )
968
- except ProcessException :
969
- if os .path .isdir (path ):
970
- rmtree_readonly (path )
971
- continue
972
-
973
- self .scm = scm
974
- self .url = url
975
- self .path = os .path .abspath (path )
976
- self .ignores ()
977
- self .set_cache (url )
978
- return True
951
+ main = True
952
+ cache = self .get_cache (url )
953
+
954
+ # Try to clone with cache ref first
955
+ if cache :
956
+ try :
957
+ scm .clone (url , path , depth = depth , protocol = protocol , cache = cache , ** kwargs )
958
+ main = False
959
+ except ProcessException , e :
960
+ if os .path .isdir (path ):
961
+ rmtree_readonly (path )
962
+
963
+ # Main clone routine if the clone with cache ref failed (might occur if cache ref is dirty)
964
+ if main :
965
+ try :
966
+ scm .clone (url , path , depth = depth , protocol = protocol , ** kwargs )
967
+ except ProcessException :
968
+ if os .path .isdir (path ):
969
+ rmtree_readonly (path )
970
+ continue
971
+
972
+ self .scm = scm
973
+ self .url = url
974
+ self .path = os .path .abspath (path )
975
+ self .ignores ()
976
+ self .set_cache (url )
977
+ return True
979
978
else :
980
979
return False
981
980
0 commit comments