Patchwork [1,of,6,V3] hgk: forward command output to ui.fout consistently

login
register
mail settings
Submitter Yuya Nishihara
Date Nov. 12, 2014, 2:38 p.m.
Message ID <d7ce6e56b0702b789ba9.1415803080@mimosa>
Download mbox | patch
Permalink /patch/6686/
State Accepted
Headers show

Comments

Yuya Nishihara - Nov. 12, 2014, 2:38 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1415796824 -32400
#      Wed Nov 12 21:53:44 2014 +0900
# Node ID d7ce6e56b0702b789ba9628a8d8a6a6400ff7194
# Parent  3480c07fc934a9c90c8dda1ed2bc98fd9c96c44a
hgk: forward command output to ui.fout consistently

Nobody would want to run hgk in command server, but it should work in
principle.  This fixes possible data corruption of command-server channel.

Patch

diff --git a/hgext/hgk.py b/hgext/hgk.py
--- a/hgext/hgk.py
+++ b/hgext/hgk.py
@@ -349,4 +349,4 @@  def view(ui, repo, *etc, **opts):
     optstr = ' '.join(['--%s %s' % (k, v) for k, v in opts.iteritems() if v])
     cmd = ui.config("hgk", "path", "hgk") + " %s %s" % (optstr, " ".join(etc))
     ui.debug("running %s\n" % cmd)
-    util.system(cmd)
+    util.system(cmd, out=ui.fout)