Show More
@@ -116,8 +116,11 b' def uisetup(ui):' | |||
|
116 | 116 | |
|
117 | 117 | def pagecmd(orig, ui, options, cmd, cmdfunc): |
|
118 | 118 | p = ui.config("pager", "pager", os.environ.get("PAGER")) |
|
119 | usepager = False | |
|
119 | 120 | |
|
120 | if p: | |
|
121 | if not p: | |
|
122 | pass | |
|
123 | else: | |
|
121 | 124 | attend = ui.configlist('pager', 'attend', attended) |
|
122 | 125 | auto = options['pager'] == 'auto' |
|
123 | 126 | always = util.parsebool(options['pager']) |
@@ -129,12 +132,15 b' def uisetup(ui):' | |||
|
129 | 132 | if (always or auto and |
|
130 | 133 | (cmd in attend or |
|
131 | 134 | (cmd not in ignore and not attend))): |
|
132 | ui.setconfig('ui', 'formatted', ui.formatted(), 'pager') | |
|
133 | ui.setconfig('ui', 'interactive', False, 'pager') | |
|
134 | if util.safehasattr(signal, "SIGPIPE"): | |
|
135 | signal.signal(signal.SIGPIPE, signal.SIG_DFL) | |
|
136 | _runpager(ui, p) | |
|
135 | usepager = True | |
|
137 | 136 | break |
|
137 | ||
|
138 | if usepager: | |
|
139 | ui.setconfig('ui', 'formatted', ui.formatted(), 'pager') | |
|
140 | ui.setconfig('ui', 'interactive', False, 'pager') | |
|
141 | if util.safehasattr(signal, "SIGPIPE"): | |
|
142 | signal.signal(signal.SIGPIPE, signal.SIG_DFL) | |
|
143 | _runpager(ui, p) | |
|
138 | 144 | return orig(ui, options, cmd, cmdfunc) |
|
139 | 145 | |
|
140 | 146 | extensions.wrapfunction(dispatch, '_runcommand', pagecmd) |
General Comments 0
You need to be logged in to leave comments.
Login now