D10450: path: teach the `hg path` command to display boolean sub-option
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Fri Apr 16 00:56:12 UTC 2021
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
The next changeset introduce one.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D10450
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
@@ -5151,6 +5151,11 @@
assert subopt not in (b'name', b'url')
if showsubopts:
fm.plain(b'%s:%s = ' % (name, subopt))
+ if isinstance(value, bool):
+ if value:
+ value = b'yes'
+ else:
+ value = b'no'
fm.condwrite(showsubopts, subopt, b'%s\n', value)
fm.end()
To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list