# HG changeset patch # User Pierre-Yves David # Date 2021-04-14 11:06:09 # Node ID b6b696442a4dcc34c0b8ec68446f394d7f3e4481 # Parent c1749dd31cdfee20926465d57d4a5a40a2fb2ebc 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 diff --git a/hgext/fastannotate/protocol.py b/hgext/fastannotate/protocol.py --- a/hgext/fastannotate/protocol.py +++ b/hgext/fastannotate/protocol.py @@ -20,6 +20,9 @@ from mercurial import ( wireprotov1peer, wireprotov1server, ) +from mercurial.utils import ( + urlutil, +) from . import context # common @@ -151,9 +154,9 @@ def peersetup(ui, peer): 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: