Patchwork D10402: mq: use the new `get_clone_path` to get the remote url

login
register
mail settings
Submitter phabricator
Date April 14, 2021, 11:37 p.m.
Message ID <differential-rev-PHID-DREV-ydamet37eqfcgjej7jlw-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48724/
State Superseded
Headers show

Comments

phabricator - April 14, 2021, 11:37 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10402

AFFECTED FILES
  hgext/mq.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -2863,11 +2863,12 @@ 
     # main repo (destination and sources)
     if dest is None:
         dest = hg.defaultdest(source)
-    sr = hg.peer(ui, opts, ui.expandpath(source))
+    __, source_path, __ = urlutil.get_clone_path(ui, source)
+    sr = hg.peer(ui, opts, source_path)
 
     # patches repo (source only)
     if opts.get(b'patches'):
-        patchespath = ui.expandpath(opts.get(b'patches'))
+        __, patchespath, __ = urlutil.get_clone_path(ui, opts.get(b'patches'))
     else:
         patchespath = patchdir(sr)
     try: