mercurial/commands.py
changeset 1048 7fbb440b2e63
parent 1047 a0538ea1ac50
child 1049 160a68cd393f
equal deleted inserted replaced
1047:a0538ea1ac50 1048:7fbb440b2e63
  1521     ('', 'debug', None, 'debug mode'),
  1521     ('', 'debug', None, 'debug mode'),
  1522     ('', 'traceback', None, 'print traceback on exception'),
  1522     ('', 'traceback', None, 'print traceback on exception'),
  1523     ('', 'time', None, 'time how long the command takes'),
  1523     ('', 'time', None, 'time how long the command takes'),
  1524     ('', 'profile', None, 'profile'),
  1524     ('', 'profile', None, 'profile'),
  1525     ('', 'version', None, 'output version information and exit'),
  1525     ('', 'version', None, 'output version information and exit'),
       
  1526     ('h', 'help', None, 'display help and exit'),
  1526 ]
  1527 ]
  1527 
  1528 
  1528 norepo = "clone init version help debugconfig debugdata" + \
  1529 norepo = "clone init version help debugconfig debugdata" + \
  1529          " debugindex debugindexdot paths"
  1530          " debugindex debugindexdot paths"
  1530 
  1531 
  1630     u = ui.ui(options["verbose"], options["debug"], options["quiet"],
  1631     u = ui.ui(options["verbose"], options["debug"], options["quiet"],
  1631               not options["noninteractive"])
  1632               not options["noninteractive"])
  1632 
  1633 
  1633     try:
  1634     try:
  1634         try:
  1635         try:
  1635             if options['version']:
  1636             if options['help']:
       
  1637                 help_(u, cmd)
       
  1638                 sys.exit(0)
       
  1639             elif options['version']:
  1636                 show_version(u)
  1640                 show_version(u)
  1637                 sys.exit(0)
  1641                 sys.exit(0)
  1638             elif not cmd:
  1642             elif not cmd:
  1639                 help_(u, 'shortlist')
  1643                 help_(u, 'shortlist')
  1640                 sys.exit(0)
  1644                 sys.exit(0)