changeset 49743:f22364e4eb13

path: pass `path` to `peer` in mq We directly use the `path` object to build the `peer` object. There is one case where we don't. We should fix that at the same time as we fix the sub-repo cases.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 02 Dec 2022 16:42:36 +0100
parents 30eb36d93072
children 5f36784c300f
files hgext/mq.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Fri Dec 02 16:36:43 2022 +0100
+++ b/hgext/mq.py	Fri Dec 02 16:42:36 2022 +0100
@@ -2854,16 +2854,17 @@
     # main repo (destination and sources)
     if dest is None:
         dest = hg.defaultdest(source)
-    __, source_path, __ = urlutil.get_clone_path(ui, source)
+    source_path = urlutil.get_clone_path_obj(ui, source)
     sr = hg.peer(ui, opts, source_path)
 
     # patches repo (source only)
     if opts.get(b'patches'):
-        __, patchespath, __ = urlutil.get_clone_path(ui, opts.get(b'patches'))
+        patches_path = urlutil.get_clone_path_obj(ui, opts.get(b'patches'))
     else:
-        patchespath = patchdir(sr)
+        # XXX path: we should turn this into a path object
+        patches_path = patchdir(sr)
     try:
-        hg.peer(ui, opts, patchespath)
+        hg.peer(ui, opts, patches_path)
     except error.RepoError:
         raise error.Abort(
             _(b'versioned patch repository not found (see init --mq)')