comparison mercurial/commands.py @ 10021:0022f5c5459e

help: don't display bogus help messages for invalid aliases
author Brodie Rao <me+hg@dackz.net>
date Sat, 05 Dec 2009 23:26:27 -0500
parents b5f352f33520
children f780b1098efc
comparison
equal deleted inserted replaced
10020:d7c23f4a14c7 10021:0022f5c5459e
1482 # py3k fix: except vars can't be used outside the scope of the 1482 # py3k fix: except vars can't be used outside the scope of the
1483 # except block, nor can be used inside a lambda. python issue4617 1483 # except block, nor can be used inside a lambda. python issue4617
1484 prefix = inst.args[0] 1484 prefix = inst.args[0]
1485 select = lambda c: c.lstrip('^').startswith(prefix) 1485 select = lambda c: c.lstrip('^').startswith(prefix)
1486 helplist(_('list of commands:\n\n'), select) 1486 helplist(_('list of commands:\n\n'), select)
1487 return
1488
1489 # check if it's an invalid alias and display its error if it is
1490 if getattr(entry[0], 'badalias', False):
1491 entry[0](ui)
1487 return 1492 return
1488 1493
1489 # synopsis 1494 # synopsis
1490 if len(entry) > 2: 1495 if len(entry) > 2:
1491 if entry[2].startswith('hg'): 1496 if entry[2].startswith('hg'):