##// END OF EJS Templates
py3: make blackbox-readonly-dispatch.py use ui instead of print()
Yuya Nishihara -
r36756:70a98c3f default
parent child Browse files
Show More
@@ -1,7 +1,8 b''
1 from __future__ import absolute_import, print_function
1 from __future__ import absolute_import
2 2 import os
3 3 from mercurial import (
4 4 dispatch,
5 ui as uimod,
5 6 )
6 7
7 8 def testdispatch(cmd):
@@ -9,10 +10,11 b' def testdispatch(cmd):'
9 10
10 11 Prints command and result value, but does not handle quoting.
11 12 """
12 print("running: %s" % (cmd,))
13 req = dispatch.request(cmd.split())
13 ui = uimod.ui.load()
14 ui.status("running: %s\n" % cmd)
15 req = dispatch.request(cmd.split(), ui)
14 16 result = dispatch.dispatch(req)
15 print("result: %r" % (result,))
17 ui.status("result: %r\n" % result)
16 18
17 19 # create file 'foo', add and commit
18 20 f = open('foo', 'wb')
General Comments 0
You need to be logged in to leave comments. Login now