comparison hgext/mq.py @ 46935:ae4c0f279282

mq: use the new `get_clone_path` to get the remote url We stop using `ui.expandpath` to use a function with a more defined semantic. This will help us to make it an option to point [paths] entry to multiple destination. Differential Revision: https://phab.mercurial-scm.org/D10402
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 14 Apr 2021 10:51:31 +0200
parents ffd3e823a7e5
children d55b71393907
comparison
equal deleted inserted replaced
46934:ebb13f9a9ba8 46935:ae4c0f279282
2861 return url + b'/.hg/patches' 2861 return url + b'/.hg/patches'
2862 2862
2863 # main repo (destination and sources) 2863 # main repo (destination and sources)
2864 if dest is None: 2864 if dest is None:
2865 dest = hg.defaultdest(source) 2865 dest = hg.defaultdest(source)
2866 sr = hg.peer(ui, opts, ui.expandpath(source)) 2866 __, source_path, __ = urlutil.get_clone_path(ui, source)
2867 sr = hg.peer(ui, opts, source_path)
2867 2868
2868 # patches repo (source only) 2869 # patches repo (source only)
2869 if opts.get(b'patches'): 2870 if opts.get(b'patches'):
2870 patchespath = ui.expandpath(opts.get(b'patches')) 2871 __, patchespath, __ = urlutil.get_clone_path(ui, opts.get(b'patches'))
2871 else: 2872 else:
2872 patchespath = patchdir(sr) 2873 patchespath = patchdir(sr)
2873 try: 2874 try:
2874 hg.peer(ui, opts, patchespath) 2875 hg.peer(ui, opts, patchespath)
2875 except error.RepoError: 2876 except error.RepoError: