changeset 46946:b6b696442a4d

fastannotate: use `get_unique_pull_path` The code does not support multiple destination yet, so lets move it to the dedicated API. Differential Revision: https://phab.mercurial-scm.org/D10412
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 14 Apr 2021 13:06:09 +0200
parents c1749dd31cdf
children 3f29765e0d95
files hgext/fastannotate/protocol.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/fastannotate/protocol.py	Wed Apr 14 12:57:55 2021 +0200
+++ b/hgext/fastannotate/protocol.py	Wed Apr 14 13:06:09 2021 +0200
@@ -20,6 +20,9 @@
     wireprotov1peer,
     wireprotov1server,
 )
+from mercurial.utils import (
+    urlutil,
+)
 from . import context
 
 # common
@@ -151,9 +154,9 @@
 def annotatepeer(repo):
     ui = repo.ui
 
-    remotepath = ui.expandpath(
-        ui.config(b'fastannotate', b'remotepath', b'default')
-    )
+    remotedest = ui.config(b'fastannotate', b'remotepath', b'default')
+    r = urlutil.get_unique_pull_path(b'fastannotate', repo, ui, remotedest)
+    remotepath = r[0]
     peer = hg.peer(ui, {}, remotepath)
 
     try: