Show More
@@ -3,6 +3,7 b'' | |||||
3 | from mercurial import demandimport |
|
3 | from mercurial import demandimport | |
4 | demandimport.enable() |
|
4 | demandimport.enable() | |
5 |
|
5 | |||
|
6 | import getopt | |||
6 | import sys |
|
7 | import sys | |
7 | from mercurial.i18n import _ |
|
8 | from mercurial.i18n import _ | |
8 | from mercurial import error, simplemerge, fancyopts, util, ui |
|
9 | from mercurial import error, simplemerge, fancyopts, util, ui | |
@@ -47,7 +48,7 b' try:' | |||||
47 | opts = {} |
|
48 | opts = {} | |
48 | try: |
|
49 | try: | |
49 | args = fancyopts.fancyopts(sys.argv[1:], options, opts) |
|
50 | args = fancyopts.fancyopts(sys.argv[1:], options, opts) | |
50 |
except |
|
51 | except getopt.GetoptError as e: | |
51 | raise ParseError(e) |
|
52 | raise ParseError(e) | |
52 | if opts['help']: |
|
53 | if opts['help']: | |
53 | showhelp() |
|
54 | showhelp() |
@@ -10,6 +10,7 b' from __future__ import absolute_import, ' | |||||
10 | import atexit |
|
10 | import atexit | |
11 | import difflib |
|
11 | import difflib | |
12 | import errno |
|
12 | import errno | |
|
13 | import getopt | |||
13 | import os |
|
14 | import os | |
14 | import pdb |
|
15 | import pdb | |
15 | import re |
|
16 | import re | |
@@ -448,7 +449,7 b' def _parse(ui, args):' | |||||
448 |
|
449 | |||
449 | try: |
|
450 | try: | |
450 | args = fancyopts.fancyopts(args, commands.globalopts, options) |
|
451 | args = fancyopts.fancyopts(args, commands.globalopts, options) | |
451 |
except |
|
452 | except getopt.GetoptError as inst: | |
452 | raise error.CommandError(None, inst) |
|
453 | raise error.CommandError(None, inst) | |
453 |
|
454 | |||
454 | if args: |
|
455 | if args: | |
@@ -471,7 +472,7 b' def _parse(ui, args):' | |||||
471 |
|
472 | |||
472 | try: |
|
473 | try: | |
473 | args = fancyopts.fancyopts(args, c, cmdoptions, gnu=True) |
|
474 | args = fancyopts.fancyopts(args, c, cmdoptions, gnu=True) | |
474 |
except |
|
475 | except getopt.GetoptError as inst: | |
475 | raise error.CommandError(cmd, inst) |
|
476 | raise error.CommandError(cmd, inst) | |
476 |
|
477 | |||
477 | # separate global options back out |
|
478 | # separate global options back out | |
@@ -601,7 +602,7 b' def _checkshellalias(lui, ui, args):' | |||||
601 |
|
602 | |||
602 | try: |
|
603 | try: | |
603 | args = fancyopts.fancyopts(args, commands.globalopts, options) |
|
604 | args = fancyopts.fancyopts(args, commands.globalopts, options) | |
604 |
except |
|
605 | except getopt.GetoptError: | |
605 | return |
|
606 | return | |
606 |
|
607 | |||
607 | if not args: |
|
608 | if not args: |
General Comments 0
You need to be logged in to leave comments.
Login now