# HG changeset patch # User Pierre-Yves David # Date 1611612513 -3600 # Node ID d481f30ea8e392b1d4db7d00ef023815335db132 # Parent aaff3bc753064c9cddf9037406d9b835d0d633c5 help: escape ':' (as '\:') when generating command names We need this before we can use ":" in command names. Differential Revision: https://phab.mercurial-scm.org/D9870 diff -r aaff3bc75306 -r d481f30ea8e3 mercurial/help.py --- a/mercurial/help.py Mon Jan 25 23:07:56 2021 +0100 +++ b/mercurial/help.py Mon Jan 25 23:08:33 2021 +0100 @@ -829,10 +829,11 @@ def appendcmds(cmds): cmds = sorted(cmds) for c in cmds: + display_cmd = c if ui.verbose: - rst.append(b" :%s: %s\n" % (b', '.join(syns[c]), h[c])) - else: - rst.append(b' :%s: %s\n' % (c, h[c])) + display_cmd = b', '.join(syns[c]) + display_cmd = display_cmd.replace(b':', br'\:') + rst.append(b' :%s: %s\n' % (display_cmd, h[c])) if name in (b'shortlist', b'debug'): # List without categories.