Show More
@@ -53,7 +53,7 b' from mercurial.i18n import _' | |||
|
53 | 53 | |
|
54 | 54 | testedwith = 'internal' |
|
55 | 55 | |
|
56 | def _runpager(p): | |
|
56 | def _runpager(ui, p): | |
|
57 | 57 | pager = subprocess.Popen(p, shell=True, bufsize=-1, |
|
58 | 58 | close_fds=util.closefds, stdin=subprocess.PIPE, |
|
59 | 59 | stdout=sys.stdout, stderr=sys.stderr) |
@@ -61,7 +61,7 b' def _runpager(p):' | |||
|
61 | 61 | stdout = os.dup(sys.stdout.fileno()) |
|
62 | 62 | stderr = os.dup(sys.stderr.fileno()) |
|
63 | 63 | os.dup2(pager.stdin.fileno(), sys.stdout.fileno()) |
|
64 |
if u |
|
|
64 | if ui._isatty(sys.stderr): | |
|
65 | 65 | os.dup2(pager.stdin.fileno(), sys.stderr.fileno()) |
|
66 | 66 | |
|
67 | 67 | @atexit.register |
@@ -72,7 +72,7 b' def _runpager(p):' | |||
|
72 | 72 | pager.wait() |
|
73 | 73 | |
|
74 | 74 | def uisetup(ui): |
|
75 |
if |
|
|
75 | if '--debugger' in sys.argv or not ui.formatted(): | |
|
76 | 76 | return |
|
77 | 77 | |
|
78 | 78 | def pagecmd(orig, ui, options, cmd, cmdfunc): |
@@ -89,7 +89,7 b' def uisetup(ui):' | |||
|
89 | 89 | ui.setconfig('ui', 'interactive', False) |
|
90 | 90 | if util.safehasattr(signal, "SIGPIPE"): |
|
91 | 91 | signal.signal(signal.SIGPIPE, signal.SIG_DFL) |
|
92 | _runpager(p) | |
|
92 | _runpager(ui, p) | |
|
93 | 93 | return orig(ui, options, cmd, cmdfunc) |
|
94 | 94 | |
|
95 | 95 | extensions.wrapfunction(dispatch, '_runcommand', pagecmd) |
General Comments 0
You need to be logged in to leave comments.
Login now