comparison mercurial/commands.py @ 618:4051b78c53c7

Handle unrecognised options correctly. # HG changeset patch # User Bryan O'Sullivan <bos@serpentine.com> # Node ID 837a023781a0228e5791e8e278129d2d54d13f99 # Parent d2994b5298fb20f87dc1d4747635b280db3c0526 Handle unrecognised options correctly.
author Bryan O'Sullivan <bos@serpentine.com>
date Mon, 04 Jul 2005 12:39:35 -0800
parents 285965ddca41
children 876333a295ff
comparison
equal deleted inserted replaced
617:285965ddca41 618:4051b78c53c7
1071 cmdoptions = {} 1071 cmdoptions = {}
1072 1072
1073 try: 1073 try:
1074 args = fancyopts.fancyopts(args, globalopts, options) 1074 args = fancyopts.fancyopts(args, globalopts, options)
1075 except fancyopts.getopt.GetoptError, inst: 1075 except fancyopts.getopt.GetoptError, inst:
1076 raise ParseError(cmd, inst) 1076 raise ParseError(None, inst)
1077 1077
1078 if options["version"]: 1078 if options["version"]:
1079 return ("version", show_version, [], options, cmdoptions) 1079 return ("version", show_version, [], options, cmdoptions)
1080 elif not args: 1080 elif not args:
1081 return ("help", help, [], options, cmdoptions) 1081 return ("help", help, [], options, cmdoptions)