Show More
@@ -1,7 +1,8 b'' | |||||
1 |
from __future__ import absolute_import |
|
1 | from __future__ import absolute_import | |
2 | import os |
|
2 | import os | |
3 | from mercurial import ( |
|
3 | from mercurial import ( | |
4 | dispatch, |
|
4 | dispatch, | |
|
5 | ui as uimod, | |||
5 | ) |
|
6 | ) | |
6 |
|
7 | |||
7 | def testdispatch(cmd): |
|
8 | def testdispatch(cmd): | |
@@ -9,10 +10,11 b' def testdispatch(cmd):' | |||||
9 |
|
10 | |||
10 | Prints command and result value, but does not handle quoting. |
|
11 | Prints command and result value, but does not handle quoting. | |
11 | """ |
|
12 | """ | |
12 | print("running: %s" % (cmd,)) |
|
13 | ui = uimod.ui.load() | |
13 | req = dispatch.request(cmd.split()) |
|
14 | ui.status("running: %s\n" % cmd) | |
|
15 | req = dispatch.request(cmd.split(), ui) | |||
14 | result = dispatch.dispatch(req) |
|
16 | result = dispatch.dispatch(req) | |
15 |
|
|
17 | ui.status("result: %r\n" % result) | |
16 |
|
18 | |||
17 | # create file 'foo', add and commit |
|
19 | # create file 'foo', add and commit | |
18 | f = open('foo', 'wb') |
|
20 | f = open('foo', 'wb') |
General Comments 0
You need to be logged in to leave comments.
Login now