diff mercurial/fancyopts.py @ 209:63af1db35611

Beginning of new command parsing interface -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Beginning of new command parsing interface This adds commands.py, with a primary interface dispatch(args) Dispatch searches a table of known commands, handles switches, sets up a repo object if appropriate, and dispatches the command. It also handles KeyboardInterrupt and can handle similar exceptions in the future. If the command is unknown, it falls through to the current command handler. Commands currently handled by the new scheme: help, init, and annotate manifest hash: 134cd032c880985e3f92f82efb8b629dd862ba4c -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCnXEGywK+sNU5EO8RAuDAAJ9q7K4w7qGVWv1NWjCPFGO/UJc6VQCdEhMQ sBBlSRzah9QPy8K94catZyg= =wuRf -----END PGP SIGNATURE-----
author mpm@selenic.com
date Wed, 01 Jun 2005 00:25:42 -0800
parents 2e87f04880ab
children 11d64332a1cb
line wrap: on
line diff
--- a/mercurial/fancyopts.py	Wed Jun 01 00:21:38 2005 -0800
+++ b/mercurial/fancyopts.py	Wed Jun 01 00:25:42 2005 -0800
@@ -46,6 +46,8 @@
         elif dt[map[opt]] is type(''): state[map[opt]] = arg
         elif dt[map[opt]] is type([]): state[map[opt]].append(arg)
         elif dt[map[opt]] is type(None): state[map[opt]] = 1
-        
+
+    del state["help"]
+
     return args