Comments
Patch
@@ -471,6 +471,13 @@
yield parseurl(url, default_branches)
+def get_clone_path(ui, source, default_branches=()):
+ """return the `(origsource, path, branch)` selected as clone source"""
+ url = ui.expandpath(source)
+ path, branch = parseurl(url, default_branches)
+ return url, path, branch
+
+
def parseurl(path, branches=None):
'''parse url#branch, returning (url, (branch, branches))'''
u = url(path)
@@ -672,8 +672,8 @@
"""
if isinstance(source, bytes):
- origsource = ui.expandpath(source)
- source, branches = urlutil.parseurl(origsource, branch)
+ src = urlutil.get_clone_path(ui, source, branch)
+ origsource, source, branches = src
srcpeer = peer(ui, peeropts, source)
else:
srcpeer = source.peer() # in case we were called with a localrepo