Mercurial > public > mercurial-scm > hg
comparison mercurial/dispatch.py @ 10651:5f091fc1bab7
style: use consistent variable names (*mod) with imports which would shadow
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Thu, 11 Mar 2010 17:43:44 +0100 |
parents | 6ded6243bde2 |
children | 8f4c95368313 |
comparison
equal
deleted
inserted
replaced
10650:9ea7238ad935 | 10651:5f091fc1bab7 |
---|---|
7 | 7 |
8 from i18n import _ | 8 from i18n import _ |
9 import os, sys, atexit, signal, pdb, socket, errno, shlex, time | 9 import os, sys, atexit, signal, pdb, socket, errno, shlex, time |
10 import util, commands, hg, fancyopts, extensions, hook, error | 10 import util, commands, hg, fancyopts, extensions, hook, error |
11 import cmdutil, encoding | 11 import cmdutil, encoding |
12 import ui as _ui | 12 import ui as uimod |
13 | 13 |
14 def run(): | 14 def run(): |
15 "run the command in sys.argv" | 15 "run the command in sys.argv" |
16 sys.exit(dispatch(sys.argv[1:])) | 16 sys.exit(dispatch(sys.argv[1:])) |
17 | 17 |
18 def dispatch(args): | 18 def dispatch(args): |
19 "run the command specified in args" | 19 "run the command specified in args" |
20 try: | 20 try: |
21 u = _ui.ui() | 21 u = uimod.ui() |
22 if '--traceback' in args: | 22 if '--traceback' in args: |
23 u.setconfig('ui', 'traceback', 'on') | 23 u.setconfig('ui', 'traceback', 'on') |
24 except util.Abort, inst: | 24 except util.Abort, inst: |
25 sys.stderr.write(_("abort: %s\n") % inst) | 25 sys.stderr.write(_("abort: %s\n") % inst) |
26 return -1 | 26 return -1 |