Patchwork D10404: narrow: use `get_unique_pull_path`

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

Comments

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

REVISION SUMMARY
  The narrow's `tracked` command does not support multiple destination, lets use
  the dedicated API then.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hgext/narrow/narrowcommands.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/narrow/narrowcommands.py b/hgext/narrow/narrowcommands.py
--- a/hgext/narrow/narrowcommands.py
+++ b/hgext/narrow/narrowcommands.py
@@ -593,8 +593,8 @@ 
         # Find the revisions we have in common with the remote. These will
         # be used for finding local-only changes for narrowing. They will
         # also define the set of revisions to update for widening.
-        remotepath = ui.expandpath(remotepath or b'default')
-        url, branches = urlutil.parseurl(remotepath)
+        r = urlutil.get_unique_pull_path(b'tracked', repo, ui, remotepath)
+        url, branches = r
         ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(url))
         remote = hg.peer(repo, opts, url)