hgext/pager.py
branchstable
changeset 10516 80a1161bc3b5
parent 10263 25e572394f5c
child 10973 49a07f441496
child 11182 3c368a1c962d
equal deleted inserted replaced
10515:98bc3e195720 10516:80a1161bc3b5
    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