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