Patchwork [3,of,5] pager: inline _pagersubprocess() into _runpager()

login
register
mail settings
Submitter Yuya Nishihara
Date Oct. 4, 2015, 6:08 a.m.
Message ID <5d7de1415596d9cc072b.1443938884@mimosa>
Download mbox | patch
Permalink /patch/10769/
State Accepted
Headers show

Comments

Yuya Nishihara - Oct. 4, 2015, 6:08 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1443852172 -32400
#      Sat Oct 03 15:02:52 2015 +0900
# Node ID 5d7de1415596d9cc072b0aba37a2bf05fcb99aa7
# Parent  e22e5ec34357049d2da1a718cbdb7414edd52ed1
pager: inline _pagersubprocess() into _runpager()

We don't need _pagersubprocess() because the fork version was removed
at 59d794154e8d.

Patch

diff --git a/hgext/pager.py b/hgext/pager.py
--- a/hgext/pager.py
+++ b/hgext/pager.py
@@ -65,7 +65,7 @@  from mercurial.i18n import _
 # leave the attribute unspecified.
 testedwith = 'internal'
 
-def _pagersubprocess(ui, p):
+def _runpager(ui, p):
     pager = subprocess.Popen(p, shell=True, bufsize=-1,
                              close_fds=util.closefds, stdin=subprocess.PIPE,
                              stdout=sys.stdout, stderr=sys.stderr)
@@ -85,9 +85,6 @@  def _pagersubprocess(ui, p):
         os.dup2(stderr, sys.stderr.fileno())
         pager.wait()
 
-def _runpager(ui, p):
-    _pagersubprocess(ui, p)
-
 def uisetup(ui):
     if '--debugger' in sys.argv or not ui.formatted():
         return