Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 50403:e9c676ad18f1 stable
path: use the next `display` argument to deal with boolean
We have a generic mechanism that we can now use for the special case now.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 17 Jun 2023 23:47:31 +0200 |
parents | 9d4a2ea3dcb9 |
children | 0ab3956540a6 |
line wrap: on
line diff
--- a/mercurial/commands.py Thu Jun 15 09:51:29 2023 +0200 +++ b/mercurial/commands.py Sat Jun 17 23:47:31 2023 +0200 @@ -5214,11 +5214,6 @@ 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' display = urlutil.path_suboptions_display[subopt] value = display(value) fm.condwrite(showsubopts, subopt, b'%s\n', value)