D10441: paths: use `list_paths` in `hg paths`
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Fri Apr 16 00:03:18 UTC 2021
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
Using common code will make it simpler to update the logic behind the path
definition and storage.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D10441
AFFECTED FILES
mercurial/commands.py
CHANGE DETAILS
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -5128,15 +5128,9 @@
"""
opts = pycompat.byteskwargs(opts)
+
+ pathitems = urlutil.list_paths(ui, search)
ui.pager(b'paths')
- if search:
- pathitems = [
- (name, path)
- for name, path in pycompat.iteritems(ui.paths)
- if name == search
- ]
- else:
- pathitems = sorted(pycompat.iteritems(ui.paths))
fm = ui.formatter(b'paths', opts)
if fm.isplain():
To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list