changeset 46939:b133154f1e7b

fetch: use `get_unique_pull_path` to retrieve the path The fetch command does not support multiple destination, so we use the new dedicated API for that. Differential Revision: https://phab.mercurial-scm.org/D10406
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 14 Apr 2021 11:38:10 +0200
parents a48f15f1c178
children 368294967c95
files hgext/fetch.py
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/fetch.py	Wed Apr 14 11:30:49 2021 +0200
+++ b/hgext/fetch.py	Wed Apr 14 11:38:10 2021 +0200
@@ -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: