Patchwork D10406: fetch: use `get_unique_pull_path` to retrieve the path

login
register
mail settings
Submitter phabricator
Date April 14, 2021, 11:37 p.m.
Message ID <differential-rev-PHID-DREV-ywr3ugmozliveg7bn3zl-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48721/
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
  The fetch command does not support multiple destination, so we use the new dedicated API for that.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hgext/fetch.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/fetch.py b/hgext/fetch.py
--- a/hgext/fetch.py
+++ b/hgext/fetch.py
@@ -109,11 +109,9 @@ 
                 )
             )
 
-        other = hg.peer(repo, opts, ui.expandpath(source))
-        ui.status(
-            _(b'pulling from %s\n')
-            % urlutil.hidepassword(ui.expandpath(source))
-        )
+        path = urlutil.get_unique_pull_path(b'fetch', repo, ui, source)[0]
+        other = hg.peer(repo, opts, path)
+        ui.status(_(b'pulling from %s\n') % urlutil.hidepassword(path))
         revs = None
         if opts[b'rev']:
             try: