[PATCH 2 of 4] py3: make blackbox-readonly-dispatch.py use ui instead of print()
Yuya Nishihara
yuya at tcha.org
Sun Mar 4 17:19:46 EST 2018
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1520200235 18000
# Sun Mar 04 16:50:35 2018 -0500
# Node ID 57d883c2f3d5bd975985356e7d9a8942d72cac9e
# Parent bbfaa4a0a9fde9170af65ef333e63f7e4626e81e
py3: make blackbox-readonly-dispatch.py use ui instead of print()
diff --git a/tests/blackbox-readonly-dispatch.py b/tests/blackbox-readonly-dispatch.py
--- a/tests/blackbox-readonly-dispatch.py
+++ b/tests/blackbox-readonly-dispatch.py
@@ -1,7 +1,8 @@
-from __future__ import absolute_import, print_function
+from __future__ import absolute_import
import os
from mercurial import (
dispatch,
+ ui as uimod,
)
def testdispatch(cmd):
@@ -9,10 +10,11 @@ def testdispatch(cmd):
Prints command and result value, but does not handle quoting.
"""
- print("running: %s" % (cmd,))
- req = dispatch.request(cmd.split())
+ ui = uimod.ui.load()
+ ui.status("running: %s\n" % cmd)
+ req = dispatch.request(cmd.split(), ui)
result = dispatch.dispatch(req)
- print("result: %r" % (result,))
+ ui.status("result: %r\n" % result)
# create file 'foo', add and commit
f = open('foo', 'wb')
More information about the Mercurial-devel
mailing list