Mercurial > hg
comparison hgext/show.py @ 33210:b93df142485e
show: also catch AmbiguousCommand
cmdutil.findcmd() can raise this as well. While we'll almost certainly
never encounter this in the wild, guard against it regardless.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 03 Jul 2017 21:18:32 -0700 |
parents | 9718725dc02a |
children | f48422ab81aa |
comparison
equal
deleted
inserted
replaced
33209:9718725dc02a | 33210:b93df142485e |
---|---|
231 newheads = set() | 231 newheads = set() |
232 | 232 |
233 try: | 233 try: |
234 cmdutil.findcmd('rebase', commands.table) | 234 cmdutil.findcmd('rebase', commands.table) |
235 haverebase = True | 235 haverebase = True |
236 except error.UnknownCommand: | 236 except (error.AmbiguousCommand, error.UnknownCommand): |
237 haverebase = False | 237 haverebase = False |
238 | 238 |
239 # TODO use templating. | 239 # TODO use templating. |
240 # TODO consider using graphmod. But it may not be necessary given | 240 # TODO consider using graphmod. But it may not be necessary given |
241 # our simplicity and the customizations required. | 241 # our simplicity and the customizations required. |