Show More
@@ -811,6 +811,13 b' def _dispatch(req):' | |||||
811 | if req.repo: |
|
811 | if req.repo: | |
812 | uis.add(req.repo.ui) |
|
812 | uis.add(req.repo.ui) | |
813 |
|
813 | |||
|
814 | if (req.earlyoptions['verbose'] or req.earlyoptions['debug'] | |||
|
815 | or req.earlyoptions['quiet']): | |||
|
816 | for opt in ('verbose', 'debug', 'quiet'): | |||
|
817 | val = pycompat.bytestr(bool(req.earlyoptions[opt])) | |||
|
818 | for ui_ in uis: | |||
|
819 | ui_.setconfig('ui', opt, val, '--' + opt) | |||
|
820 | ||||
814 | if req.earlyoptions['profile']: |
|
821 | if req.earlyoptions['profile']: | |
815 | for ui_ in uis: |
|
822 | for ui_ in uis: | |
816 | ui_.setconfig('profiling', 'enabled', 'true', '--profile') |
|
823 | ui_.setconfig('profiling', 'enabled', 'true', '--profile') | |
@@ -876,8 +883,11 b' def _dispatch(req):' | |||||
876 | if options["profile"]: |
|
883 | if options["profile"]: | |
877 | profiler.start() |
|
884 | profiler.start() | |
878 |
|
885 | |||
|
886 | # if abbreviated version of this were used, take them in account, now | |||
879 | if options['verbose'] or options['debug'] or options['quiet']: |
|
887 | if options['verbose'] or options['debug'] or options['quiet']: | |
880 | for opt in ('verbose', 'debug', 'quiet'): |
|
888 | for opt in ('verbose', 'debug', 'quiet'): | |
|
889 | if options[opt] == req.earlyoptions[opt]: | |||
|
890 | continue | |||
881 | val = pycompat.bytestr(bool(options[opt])) |
|
891 | val = pycompat.bytestr(bool(options[opt])) | |
882 | for ui_ in uis: |
|
892 | for ui_ in uis: | |
883 | ui_.setconfig('ui', opt, val, '--' + opt) |
|
893 | ui_.setconfig('ui', opt, val, '--' + opt) |
@@ -9,7 +9,9 b' Test basic extension support' | |||||
9 | > configitem = registrar.configitem(configtable) |
|
9 | > configitem = registrar.configitem(configtable) | |
10 | > configitem(b'tests', b'foo', default=b"Foo") |
|
10 | > configitem(b'tests', b'foo', default=b"Foo") | |
11 | > def uisetup(ui): |
|
11 | > def uisetup(ui): | |
|
12 | > ui.debug(b"uisetup called [debug]\\n") | |||
12 | > ui.write(b"uisetup called\\n") |
|
13 | > ui.write(b"uisetup called\\n") | |
|
14 | > ui.status(b"uisetup called [status]\\n") | |||
13 | > ui.flush() |
|
15 | > ui.flush() | |
14 | > def reposetup(ui, repo): |
|
16 | > def reposetup(ui, repo): | |
15 | > ui.write(b"reposetup called for %s\\n" % os.path.basename(repo.root)) |
|
17 | > ui.write(b"reposetup called for %s\\n" % os.path.basename(repo.root)) | |
@@ -40,15 +42,29 b' Test basic extension support' | |||||
40 | $ echo "foobar = $abspath" >> $HGRCPATH |
|
42 | $ echo "foobar = $abspath" >> $HGRCPATH | |
41 | $ hg foo |
|
43 | $ hg foo | |
42 | uisetup called |
|
44 | uisetup called | |
|
45 | uisetup called [status] | |||
43 | reposetup called for a |
|
46 | reposetup called for a | |
44 | ui == repo.ui |
|
47 | ui == repo.ui | |
45 | reposetup called for a (chg !) |
|
48 | reposetup called for a (chg !) | |
46 | ui == repo.ui (chg !) |
|
49 | ui == repo.ui (chg !) | |
47 | Foo |
|
50 | Foo | |
|
51 | $ hg foo --quiet | |||
|
52 | uisetup called (no-chg !) | |||
|
53 | reposetup called for a (chg !) | |||
|
54 | ui == repo.ui | |||
|
55 | Foo | |||
|
56 | $ hg foo --debug | |||
|
57 | uisetup called [debug] (no-chg !) | |||
|
58 | uisetup called (no-chg !) | |||
|
59 | uisetup called [status] (no-chg !) | |||
|
60 | reposetup called for a (chg !) | |||
|
61 | ui == repo.ui | |||
|
62 | Foo | |||
48 |
|
63 | |||
49 | $ cd .. |
|
64 | $ cd .. | |
50 | $ hg clone a b |
|
65 | $ hg clone a b | |
51 | uisetup called (no-chg !) |
|
66 | uisetup called (no-chg !) | |
|
67 | uisetup called [status] (no-chg !) | |||
52 | reposetup called for a |
|
68 | reposetup called for a | |
53 | ui == repo.ui |
|
69 | ui == repo.ui | |
54 | reposetup called for b |
|
70 | reposetup called for b | |
@@ -58,6 +74,7 b' Test basic extension support' | |||||
58 |
|
74 | |||
59 | $ hg bar |
|
75 | $ hg bar | |
60 | uisetup called (no-chg !) |
|
76 | uisetup called (no-chg !) | |
|
77 | uisetup called [status] (no-chg !) | |||
61 | Bar |
|
78 | Bar | |
62 | $ echo 'foobar = !' >> $HGRCPATH |
|
79 | $ echo 'foobar = !' >> $HGRCPATH | |
63 |
|
80 | |||
@@ -67,6 +84,7 b' module/__init__.py-style' | |||||
67 | $ cd a |
|
84 | $ cd a | |
68 | $ hg foo |
|
85 | $ hg foo | |
69 | uisetup called |
|
86 | uisetup called | |
|
87 | uisetup called [status] | |||
70 | reposetup called for a |
|
88 | reposetup called for a | |
71 | ui == repo.ui |
|
89 | ui == repo.ui | |
72 | reposetup called for a (chg !) |
|
90 | reposetup called for a (chg !) |
General Comments 0
You need to be logged in to leave comments.
Login now