##// END OF EJS Templates
path: pass `path` to `peer` in `hg clone`...
marmoute -
r50640:0d7ecac8 default
parent child Browse files
Show More
@@ -702,10 +702,18 b' def clone('
702 """
702 """
703
703
704 if isinstance(source, bytes):
704 if isinstance(source, bytes):
705 src = urlutil.get_clone_path(ui, source, branch)
705 src_path = urlutil.get_clone_path_obj(ui, source)
706 origsource, source, branches = src
706 if src_path is None:
707 srcpeer = peer(ui, peeropts, source)
707 srcpeer = peer(ui, peeropts, b'')
708 origsource = source = b''
709 branches = (None, branch or [])
710 else:
711 srcpeer = peer(ui, peeropts, src_path)
712 origsource = src_path.rawloc
713 branches = (src_path.branch, branch or [])
714 source = src_path.loc
708 else:
715 else:
716 # XXX path: simply use the peer `path` object when this become available
709 srcpeer = source.peer() # in case we were called with a localrepo
717 srcpeer = source.peer() # in case we were called with a localrepo
710 branches = (None, branch or [])
718 branches = (None, branch or [])
711 origsource = source = srcpeer.url()
719 origsource = source = srcpeer.url()
@@ -719,7 +727,11 b' def clone('
719 if dest:
727 if dest:
720 ui.status(_(b"destination directory: %s\n") % dest)
728 ui.status(_(b"destination directory: %s\n") % dest)
721 else:
729 else:
722 dest = urlutil.get_clone_path(ui, dest)[0]
730 dest_path = urlutil.get_clone_path_obj(ui, dest)
731 if dest_path is not None:
732 dest = dest_path.rawloc
733 else:
734 dest = b''
723
735
724 dest = urlutil.urllocalpath(dest)
736 dest = urlutil.urllocalpath(dest)
725 source = urlutil.urllocalpath(source)
737 source = urlutil.urllocalpath(source)
General Comments 0
You need to be logged in to leave comments. Login now