Show More
@@ -72,6 +72,7 b' from mercurial import (' | |||||
72 | commands, |
|
72 | commands, | |
73 | dispatch, |
|
73 | dispatch, | |
74 | encoding, |
|
74 | encoding, | |
|
75 | error, | |||
75 | extensions, |
|
76 | extensions, | |
76 | util, |
|
77 | util, | |
77 | ) |
|
78 | ) | |
@@ -105,6 +106,9 b' def _runpager(ui, p):' | |||||
105 | pager.stdin.close() |
|
106 | pager.stdin.close() | |
106 | pager.wait() |
|
107 | pager.wait() | |
107 |
|
108 | |||
|
109 | def catchterm(*args): | |||
|
110 | raise error.SignalInterrupt | |||
|
111 | ||||
108 | def uisetup(ui): |
|
112 | def uisetup(ui): | |
109 | class pagerui(ui.__class__): |
|
113 | class pagerui(ui.__class__): | |
110 | def _runpager(self, pagercmd): |
|
114 | def _runpager(self, pagercmd): | |
@@ -144,6 +148,8 b' def uisetup(ui):' | |||||
144 | if usepager: |
|
148 | if usepager: | |
145 | ui.setconfig('ui', 'formatted', ui.formatted(), 'pager') |
|
149 | ui.setconfig('ui', 'formatted', ui.formatted(), 'pager') | |
146 | ui.setconfig('ui', 'interactive', False, 'pager') |
|
150 | ui.setconfig('ui', 'interactive', False, 'pager') | |
|
151 | if util.safehasattr(signal, "SIGPIPE"): | |||
|
152 | signal.signal(signal.SIGPIPE, catchterm) | |||
147 | ui._runpager(p) |
|
153 | ui._runpager(p) | |
148 | return orig(ui, options, cmd, cmdfunc) |
|
154 | return orig(ui, options, cmd, cmdfunc) | |
149 |
|
155 |
General Comments 0
You need to be logged in to leave comments.
Login now