comparison mercurial/dispatch.py @ 45679:65e2b64670b5

errors: name arguments to AmbiguousCommand constructor Differential Revision: https://phab.mercurial-scm.org/D9165
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 06 Oct 2020 20:45:52 -0700
parents bd2df58366b1
children bb1a988ef4a5
comparison
equal deleted inserted replaced
45678:bd2df58366b1 45679:65e2b64670b5
487 try: 487 try:
488 return scmutil.callcatch(ui, func) 488 return scmutil.callcatch(ui, func)
489 except error.AmbiguousCommand as inst: 489 except error.AmbiguousCommand as inst:
490 ui.warn( 490 ui.warn(
491 _(b"hg: command '%s' is ambiguous:\n %s\n") 491 _(b"hg: command '%s' is ambiguous:\n %s\n")
492 % (inst.args[0], b" ".join(inst.args[1])) 492 % (inst.prefix, b" ".join(inst.matches))
493 ) 493 )
494 except error.CommandError as inst: 494 except error.CommandError as inst:
495 if inst.command: 495 if inst.command:
496 ui.pager(b'help') 496 ui.pager(b'help')
497 msgbytes = pycompat.bytestr(inst.message) 497 msgbytes = pycompat.bytestr(inst.message)