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