diff mercurial/commands.py @ 15020:607f1434501d

help: drop with_version If --version is specified, we print the version and exit (as documented).
author Matt Mackall <mpm@selenic.com>
date Thu, 04 Aug 2011 15:08:41 -0500
parents caa5283390f8
children bf1fa4ba582b
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Aug 02 15:21:10 2011 -0400
+++ b/mercurial/commands.py	Thu Aug 04 15:08:41 2011 -0500
@@ -2579,7 +2579,7 @@
     [('e', 'extension', None, _('show only help for extensions')),
      ('c', 'command', None, _('show only help for commands'))],
     _('[-ec] [TOPIC]'))
-def help_(ui, name=None, with_version=False, unknowncmd=False, full=True, **opts):
+def help_(ui, name=None, unknowncmd=False, full=True, **opts):
     """show help for a given topic or a help overview
 
     With no arguments, print a list of commands with short help messages.
@@ -2612,10 +2612,6 @@
             option_lists.append((msg, ()))
 
     def helpcmd(name):
-        if with_version:
-            version_(ui)
-            ui.write('\n')
-
         try:
             aliases, entry = cmdutil.findcmd(name, table, strict=unknowncmd)
         except error.AmbiguousCommand, inst:
@@ -2809,10 +2805,7 @@
 
     else:
         # program name
-        if ui.verbose or with_version:
-            version_(ui)
-        else:
-            ui.status(_("Mercurial Distributed SCM\n"))
+        ui.status(_("Mercurial Distributed SCM\n"))
         ui.status('\n')
 
         # list of commands