57 p = ui.config("pager", "pager", os.environ.get("PAGER")) |
57 p = ui.config("pager", "pager", os.environ.get("PAGER")) |
58 if p and sys.stdout.isatty() and '--debugger' not in sys.argv: |
58 if p and sys.stdout.isatty() and '--debugger' not in sys.argv: |
59 attend = ui.configlist('pager', 'attend', attended) |
59 attend = ui.configlist('pager', 'attend', attended) |
60 if (cmd in attend or |
60 if (cmd in attend or |
61 (cmd not in ui.configlist('pager', 'ignore') and not attend)): |
61 (cmd not in ui.configlist('pager', 'ignore') and not attend)): |
|
62 ui.setconfig('ui', 'interactive', False) |
62 sys.stderr = sys.stdout = util.popen(p, "wb") |
63 sys.stderr = sys.stdout = util.popen(p, "wb") |
63 if ui.configbool('pager', 'quiet'): |
64 if ui.configbool('pager', 'quiet'): |
64 signal.signal(signal.SIGPIPE, signal.SIG_DFL) |
65 signal.signal(signal.SIGPIPE, signal.SIG_DFL) |
65 return orig(ui, options, cmd, cmdfunc) |
66 return orig(ui, options, cmd, cmdfunc) |
66 |
67 |