Patchwork [3,of,4,STABLE] chgserver: update comment describing when to fall back to core _runsystem()

login
register
mail settings
Submitter Yuya Nishihara
Date Sept. 26, 2018, 1:59 p.m.
Message ID <56a416fce073de567382.1537970355@mimosa>
Download mbox | patch
Permalink /patch/35055/
State Accepted
Headers show

Comments

Yuya Nishihara - Sept. 26, 2018, 1:59 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1537964465 -32400
#      Wed Sep 26 21:21:05 2018 +0900
# Branch stable
# Node ID 56a416fce073de56738286c469bf0931ebbddab2
# Parent  2a1d09ba204e9e7727286fdc0e8d7cfdeb22bb1d
chgserver: update comment describing when to fall back to core _runsystem()

The condition "output needs to be captured" was moved to the core ui, and
removed at fbce78c58f1e "chg: refactor ui.system() to be partly overridden."

The next patch will add one more "if" to address the issue 5992.

Patch

diff --git a/mercurial/chgserver.py b/mercurial/chgserver.py
--- a/mercurial/chgserver.py
+++ b/mercurial/chgserver.py
@@ -198,10 +198,10 @@  def _newchgui(srcui, csystem, attachio):
                 self._csystem = csystem
 
         def _runsystem(self, cmd, environ, cwd, out):
-            # fallback to the original system method if the output needs to be
-            # captured (to self._buffers), or the output stream is not stdout
-            # (e.g. stderr, cStringIO), because the chg client is not aware of
-            # these situations and will behave differently (write to stdout).
+            # fallback to the original system method if
+            #  a. the output stream is not stdout (e.g. stderr, cStringIO),
+            # because the chg client is not aware of these situations and
+            # will behave differently (i.e. write to stdout).
             if (out is not self.fout
                 or not util.safehasattr(self.fout, 'fileno')
                 or self.fout.fileno() != procutil.stdout.fileno()):