Patchwork D10412: fastannotate: use `get_unique_pull_path`

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

Comments

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

REVISION SUMMARY
  The code does not support multiple destination yet, so lets move it to the
  dedicated API.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hgext/fastannotate/protocol.py

CHANGE DETAILS




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

Patch

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 @@ 
     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('fastannotate', repo, ui, remotedest)
+    remotepath = r[0]
     peer = hg.peer(ui, {}, remotepath)
 
     try: