changeset 26453:1a2578418689

pager: rename variables of backup fds The next patch will add backup file objects, so the original variable names would be confusing.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 03 Oct 2015 18:48:21 +0900
parents 499d5c98e98b
children 62c5e937f477
files hgext/pager.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/pager.py	Sat Oct 03 15:02:52 2015 +0900
+++ b/hgext/pager.py	Sat Oct 03 18:48:21 2015 +0900
@@ -70,8 +70,8 @@
                              close_fds=util.closefds, stdin=subprocess.PIPE,
                              stdout=sys.stdout, stderr=sys.stderr)
 
-    stdout = os.dup(sys.stdout.fileno())
-    stderr = os.dup(sys.stderr.fileno())
+    stdoutfd = os.dup(sys.stdout.fileno())
+    stderrfd = os.dup(sys.stderr.fileno())
     os.dup2(pager.stdin.fileno(), sys.stdout.fileno())
     if ui._isatty(sys.stderr):
         os.dup2(pager.stdin.fileno(), sys.stderr.fileno())
@@ -81,8 +81,8 @@
         if util.safehasattr(signal, "SIGINT"):
             signal.signal(signal.SIGINT, signal.SIG_IGN)
         pager.stdin.close()
-        os.dup2(stdout, sys.stdout.fileno())
-        os.dup2(stderr, sys.stderr.fileno())
+        os.dup2(stdoutfd, sys.stdout.fileno())
+        os.dup2(stderrfd, sys.stderr.fileno())
         pager.wait()
 
 def uisetup(ui):