##// END OF EJS Templates
backout: backed out changeset 2f2107c01dee (+1 change)...
Raphaël Gomès -
r49065:d24bba52 default draft
parent child Browse files
Show More
@@ -252,14 +252,9 b' def dispatch(req):'
252 252 err = e
253 253 status = -1
254 254
255 # Somehow we have to catcht he exception here; catching it inside
256 # _flushstdio() doesn't work.
257 try:
258 ret = _flushstdio(req.ui, err)
259 if ret and not status:
260 status = ret
261 except BaseException:
262 pass
255 ret = _flushstdio(req.ui, err)
256 if ret and not status:
257 status = ret
263 258 return status
264 259
265 260
@@ -322,10 +317,7 b' def _rundispatch(req):'
322 317 ret = -1
323 318 finally:
324 319 duration = util.timer() - starttime
325 try:
326 req.ui.flush() # record blocked times
327 except BaseException:
328 pass
320 req.ui.flush() # record blocked times
329 321 if req.ui.logblockedtimes:
330 322 req.ui._blockedtimes[b'command_duration'] = duration * 1000
331 323 req.ui.log(
@@ -349,10 +341,7 b' def _rundispatch(req):'
349 341 except: # exiting, so no re-raises
350 342 ret = ret or -1
351 343 # do flush again since ui.log() and exit handlers may write to ui
352 try:
353 req.ui.flush()
354 except BaseException:
355 pass
344 req.ui.flush()
356 345 return ret
357 346
358 347
@@ -473,10 +462,7 b' def _runcatch(req):'
473 462 try:
474 463 return _dispatch(req)
475 464 finally:
476 try:
477 ui.flush() # record blocked times
478 except BaseException:
479 pass
465 ui.flush()
480 466 except: # re-raises
481 467 # enter the debugger when we hit an exception
482 468 if req.earlyoptions[b'debugger']:
@@ -185,6 +185,17 b' in this test.'
185 185 > bulkwrite = $TESTTMP/bulkwrite.py
186 186 > EOF
187 187
188 #if py3
189 $ chg bulkwrite --pager=on --color no --config ui.formatted=True
190 paged! 'going to write massive data\n'
191 killed! (?)
192 [255]
193
194 $ chg bulkwrite --pager=on --color no --config ui.formatted=True
195 paged! 'going to write massive data\n'
196 killed! (?)
197 [255]
198 #else
188 199 $ chg bulkwrite --pager=on --color no --config ui.formatted=True
189 200 paged! 'going to write massive data\n'
190 201 killed! (?)
@@ -194,6 +205,7 b' in this test.'
194 205 paged! 'going to write massive data\n'
195 206 killed! (?)
196 207 [250]
208 #endif
197 209
198 210 $ cd ..
199 211
@@ -219,7 +219,8 b' use shell=True in the subprocess call:'
219 219 #endif
220 220
221 221 A complicated pager command gets worse behavior. Bonus points if you can
222 improve this.
222 improve this. Windows apparently does this better, but only sometimes?
223 #if windows
223 224 $ hg log --limit 3 \
224 225 > --config pager.pager='this-command-better-never-exist --seriously' \
225 226 > 2>/dev/null || true
@@ -239,6 +240,11 b' improve this.'
239 240 date: Thu Jan 01 00:00:00 1970 +0000 (?)
240 241 summary: modify a 8 (?)
241 242 (?)
243 #else
244 $ hg log --limit 3 \
245 > --config pager.pager='this-command-better-never-exist --seriously' \
246 > 2>/dev/null || true
247 #endif
242 248
243 249 Pager works with shell aliases.
244 250
General Comments 0
You need to be logged in to leave comments. Login now