Added options -h/--help.
--- a/mercurial/commands.py Fri Aug 26 08:26:21 2005 +0200
+++ b/mercurial/commands.py Fri Aug 26 08:37:41 2005 +0200
@@ -1523,6 +1523,7 @@
('', 'time', None, 'time how long the command takes'),
('', 'profile', None, 'profile'),
('', 'version', None, 'output version information and exit'),
+ ('h', 'help', None, 'display help and exit'),
]
norepo = "clone init version help debugconfig debugdata" + \
@@ -1632,7 +1633,10 @@
try:
try:
- if options['version']:
+ if options['help']:
+ help_(u, cmd)
+ sys.exit(0)
+ elif options['version']:
show_version(u)
sys.exit(0)
elif not cmd:
--- a/tests/test-help.out Fri Aug 26 08:26:21 2005 +0200
+++ b/tests/test-help.out Fri Aug 26 08:37:41 2005 +0200
@@ -112,7 +112,6 @@
update update or merge working directory
verify verify the integrity of the repository
version output version and copyright information
-hg add: option -h not recognized
hg add [OPTION]... [FILE]...
add the specified files on the next commit