##// END OF EJS Templates
progress: stop double-wrapping of ui class...
Pierre-Yves David -
r25482:95f49013 default
parent child Browse files
Show More
@@ -312,13 +312,15 b' def uisetup(ui):'
312 if ui.configbool('progress', 'disable'):
312 if ui.configbool('progress', 'disable'):
313 return
313 return
314 if shouldprint(ui) and not ui.debugflag and not ui.quiet:
314 if shouldprint(ui) and not ui.debugflag and not ui.quiet:
315 ui.__class__ = progressui
315 dval = object()
316 # we instantiate one globally shared progress bar to avoid
316 if getattr(ui, '_progbar', dval) is dval:
317 # competing progress bars when multiple UI objects get created
317 ui.__class__ = progressui
318 if not progressui._progbar:
318 # we instantiate one globally-shared progress bar to avoid
319 if _singleton is None:
319 # competing progress bars when multiple UI objects get created
320 _singleton = progbar(ui)
320 if not progressui._progbar:
321 progressui._progbar = _singleton
321 if _singleton is None:
322 _singleton = progbar(ui)
323 progressui._progbar = _singleton
322
324
323 def reposetup(ui, repo):
325 def reposetup(ui, repo):
324 uisetup(repo.ui)
326 uisetup(repo.ui)
@@ -282,18 +282,11 b' enable progress extension:'
282 $ hg archive ../with-progress
282 $ hg archive ../with-progress
283 \r (no-eol) (esc)
283 \r (no-eol) (esc)
284 archiving [ ] 0/6\r (no-eol) (esc)
284 archiving [ ] 0/6\r (no-eol) (esc)
285 archiving [ ] 0/6\r (no-eol) (esc)
286 archiving [======> ] 1/6\r (no-eol) (esc)
285 archiving [======> ] 1/6\r (no-eol) (esc)
287 archiving [======> ] 1/6\r (no-eol) (esc)
288 archiving [=============> ] 2/6\r (no-eol) (esc)
289 archiving [=============> ] 2/6\r (no-eol) (esc)
286 archiving [=============> ] 2/6\r (no-eol) (esc)
290 archiving [====================> ] 3/6\r (no-eol) (esc)
287 archiving [====================> ] 3/6\r (no-eol) (esc)
291 archiving [====================> ] 3/6\r (no-eol) (esc)
292 archiving [===========================> ] 4/6\r (no-eol) (esc)
293 archiving [===========================> ] 4/6\r (no-eol) (esc)
288 archiving [===========================> ] 4/6\r (no-eol) (esc)
294 archiving [==================================> ] 5/6\r (no-eol) (esc)
289 archiving [==================================> ] 5/6\r (no-eol) (esc)
295 archiving [==================================> ] 5/6\r (no-eol) (esc)
296 archiving [==========================================>] 6/6\r (no-eol) (esc)
297 archiving [==========================================>] 6/6\r (no-eol) (esc)
290 archiving [==========================================>] 6/6\r (no-eol) (esc)
298 \r (no-eol) (esc)
291 \r (no-eol) (esc)
299
292
@@ -10,37 +10,20 b' plain'
10 \r (no-eol) (esc)
10 \r (no-eol) (esc)
11 building [ ] 0/12\r (no-eol) (esc)
11 building [ ] 0/12\r (no-eol) (esc)
12 building [ ] 0/12\r (no-eol) (esc)
12 building [ ] 0/12\r (no-eol) (esc)
13 building [ ] 0/12\r (no-eol) (esc)
14 building [ ] 0/12\r (no-eol) (esc)
15 building [==> ] 1/12\r (no-eol) (esc)
16 building [==> ] 1/12\r (no-eol) (esc)
17 building [==> ] 1/12\r (no-eol) (esc)
13 building [==> ] 1/12\r (no-eol) (esc)
18 building [==> ] 1/12\r (no-eol) (esc)
14 building [==> ] 1/12\r (no-eol) (esc)
19 building [======> ] 2/12\r (no-eol) (esc)
15 building [======> ] 2/12\r (no-eol) (esc)
20 building [======> ] 2/12\r (no-eol) (esc)
21 building [=========> ] 3/12\r (no-eol) (esc)
22 building [=========> ] 3/12\r (no-eol) (esc)
16 building [=========> ] 3/12\r (no-eol) (esc)
23 building [=============> ] 4/12\r (no-eol) (esc)
17 building [=============> ] 4/12\r (no-eol) (esc)
24 building [=============> ] 4/12\r (no-eol) (esc)
18 building [=============> ] 4/12\r (no-eol) (esc)
25 building [=============> ] 4/12\r (no-eol) (esc)
19 building [=============> ] 4/12\r (no-eol) (esc)
26 building [=============> ] 4/12\r (no-eol) (esc)
27 building [=============> ] 4/12\r (no-eol) (esc)
28 building [=============> ] 4/12\r (no-eol) (esc)
29 building [================> ] 5/12\r (no-eol) (esc)
30 building [================> ] 5/12\r (no-eol) (esc)
20 building [================> ] 5/12\r (no-eol) (esc)
31 building [====================> ] 6/12\r (no-eol) (esc)
21 building [====================> ] 6/12\r (no-eol) (esc)
32 building [====================> ] 6/12\r (no-eol) (esc)
33 building [=======================> ] 7/12\r (no-eol) (esc)
34 building [=======================> ] 7/12\r (no-eol) (esc)
22 building [=======================> ] 7/12\r (no-eol) (esc)
35 building [===========================> ] 8/12\r (no-eol) (esc)
23 building [===========================> ] 8/12\r (no-eol) (esc)
36 building [===========================> ] 8/12\r (no-eol) (esc)
24 building [===========================> ] 8/12\r (no-eol) (esc)
37 building [===========================> ] 8/12\r (no-eol) (esc)
38 building [===========================> ] 8/12\r (no-eol) (esc)
39 building [==============================> ] 9/12\r (no-eol) (esc)
40 building [==============================> ] 9/12\r (no-eol) (esc)
25 building [==============================> ] 9/12\r (no-eol) (esc)
41 building [==================================> ] 10/12\r (no-eol) (esc)
26 building [==================================> ] 10/12\r (no-eol) (esc)
42 building [==================================> ] 10/12\r (no-eol) (esc)
43 building [=====================================> ] 11/12\r (no-eol) (esc)
44 building [=====================================> ] 11/12\r (no-eol) (esc)
27 building [=====================================> ] 11/12\r (no-eol) (esc)
45 \r (no-eol) (esc)
28 \r (no-eol) (esc)
46
29
@@ -289,18 +289,11 b" Test breaking format changes aren't"
289
289
290 \r (no-eol) (esc)
290 \r (no-eol) (esc)
291 sending [ ] 0/3\r (no-eol) (esc)
291 sending [ ] 0/3\r (no-eol) (esc)
292 sending [ ] 0/3\r (no-eol) (esc)
293 \r (no-eol) (esc)
294 \r (no-eol) (esc)
295 \r (no-eol) (esc)
292 \r (no-eol) (esc)
296 \r (no-eol) (esc)
293 \r (no-eol) (esc)
297 sending [==============> ] 1/3\r (no-eol) (esc)
294 sending [==============> ] 1/3\r (no-eol) (esc)
298 sending [==============> ] 1/3\r (no-eol) (esc)
299 \r (no-eol) (esc)
295 \r (no-eol) (esc)
300 \r (no-eol) (esc)
296 \r (no-eol) (esc)
301 \r (no-eol) (esc)
302 \r (no-eol) (esc)
303 sending [=============================> ] 2/3\r (no-eol) (esc)
304 sending [=============================> ] 2/3\r (no-eol) (esc)
297 sending [=============================> ] 2/3\r (no-eol) (esc)
305 \r (esc)
298 \r (esc)
306 sending [PATCH 0 of 2] test ...
299 sending [PATCH 0 of 2] test ...
@@ -273,29 +273,19 b' only show up in the test output, not in '
273 $ hg archive --subrepos ../archive
273 $ hg archive --subrepos ../archive
274 \r (no-eol) (esc)
274 \r (no-eol) (esc)
275 archiving [ ] 0/3\r (no-eol) (esc)
275 archiving [ ] 0/3\r (no-eol) (esc)
276 archiving [ ] 0/3\r (no-eol) (esc)
277 archiving [=============> ] 1/3\r (no-eol) (esc)
278 archiving [=============> ] 1/3\r (no-eol) (esc)
276 archiving [=============> ] 1/3\r (no-eol) (esc)
279 archiving [===========================> ] 2/3\r (no-eol) (esc)
277 archiving [===========================> ] 2/3\r (no-eol) (esc)
280 archiving [===========================> ] 2/3\r (no-eol) (esc)
281 archiving [==========================================>] 3/3\r (no-eol) (esc)
282 archiving [==========================================>] 3/3\r (no-eol) (esc)
278 archiving [==========================================>] 3/3\r (no-eol) (esc)
283 \r (no-eol) (esc)
279 \r (no-eol) (esc)
284 \r (no-eol) (esc)
280 \r (no-eol) (esc)
285 archiving (foo) [ ] 0/3\r (no-eol) (esc)
281 archiving (foo) [ ] 0/3\r (no-eol) (esc)
286 archiving (foo) [ ] 0/3\r (no-eol) (esc)
287 archiving (foo) [===========> ] 1/3\r (no-eol) (esc)
288 archiving (foo) [===========> ] 1/3\r (no-eol) (esc)
282 archiving (foo) [===========> ] 1/3\r (no-eol) (esc)
289 archiving (foo) [=======================> ] 2/3\r (no-eol) (esc)
283 archiving (foo) [=======================> ] 2/3\r (no-eol) (esc)
290 archiving (foo) [=======================> ] 2/3\r (no-eol) (esc)
291 archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
292 archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
284 archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
293 \r (no-eol) (esc)
285 \r (no-eol) (esc)
294 \r (no-eol) (esc)
286 \r (no-eol) (esc)
295 archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc)
287 archiving (foo/bar) [ ] 0/1\r (no-eol) (esc)
296 archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc)
288 archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc)
297 archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc)
298 archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc)
299 \r (no-eol) (esc)
289 \r (no-eol) (esc)
300 $ find ../archive | sort
290 $ find ../archive | sort
301 ../archive
291 ../archive
@@ -315,29 +305,19 b' Test archiving to zip file (unzip output'
315 $ hg archive --subrepos --prefix '.' ../archive.zip
305 $ hg archive --subrepos --prefix '.' ../archive.zip
316 \r (no-eol) (esc)
306 \r (no-eol) (esc)
317 archiving [ ] 0/3\r (no-eol) (esc)
307 archiving [ ] 0/3\r (no-eol) (esc)
318 archiving [ ] 0/3\r (no-eol) (esc)
319 archiving [=============> ] 1/3\r (no-eol) (esc)
320 archiving [=============> ] 1/3\r (no-eol) (esc)
308 archiving [=============> ] 1/3\r (no-eol) (esc)
321 archiving [===========================> ] 2/3\r (no-eol) (esc)
309 archiving [===========================> ] 2/3\r (no-eol) (esc)
322 archiving [===========================> ] 2/3\r (no-eol) (esc)
323 archiving [==========================================>] 3/3\r (no-eol) (esc)
324 archiving [==========================================>] 3/3\r (no-eol) (esc)
310 archiving [==========================================>] 3/3\r (no-eol) (esc)
325 \r (no-eol) (esc)
311 \r (no-eol) (esc)
326 \r (no-eol) (esc)
312 \r (no-eol) (esc)
327 archiving (foo) [ ] 0/3\r (no-eol) (esc)
313 archiving (foo) [ ] 0/3\r (no-eol) (esc)
328 archiving (foo) [ ] 0/3\r (no-eol) (esc)
329 archiving (foo) [===========> ] 1/3\r (no-eol) (esc)
330 archiving (foo) [===========> ] 1/3\r (no-eol) (esc)
314 archiving (foo) [===========> ] 1/3\r (no-eol) (esc)
331 archiving (foo) [=======================> ] 2/3\r (no-eol) (esc)
315 archiving (foo) [=======================> ] 2/3\r (no-eol) (esc)
332 archiving (foo) [=======================> ] 2/3\r (no-eol) (esc)
333 archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
334 archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
316 archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
335 \r (no-eol) (esc)
317 \r (no-eol) (esc)
336 \r (no-eol) (esc)
318 \r (no-eol) (esc)
337 archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc)
319 archiving (foo/bar) [ ] 0/1\r (no-eol) (esc)
338 archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc)
320 archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc)
339 archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc)
340 archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc)
341 \r (no-eol) (esc)
321 \r (no-eol) (esc)
342
322
343 (unzip date formating is unstable, we do not care about it and glob it out)
323 (unzip date formating is unstable, we do not care about it and glob it out)
@@ -383,12 +363,8 b' cloned:'
383 $ hg archive --subrepos -r tip --prefix './' ../archive.tar.gz
363 $ hg archive --subrepos -r tip --prefix './' ../archive.tar.gz
384 \r (no-eol) (esc)
364 \r (no-eol) (esc)
385 archiving [ ] 0/3\r (no-eol) (esc)
365 archiving [ ] 0/3\r (no-eol) (esc)
386 archiving [ ] 0/3\r (no-eol) (esc)
387 archiving [=============> ] 1/3\r (no-eol) (esc)
388 archiving [=============> ] 1/3\r (no-eol) (esc)
366 archiving [=============> ] 1/3\r (no-eol) (esc)
389 archiving [===========================> ] 2/3\r (no-eol) (esc)
367 archiving [===========================> ] 2/3\r (no-eol) (esc)
390 archiving [===========================> ] 2/3\r (no-eol) (esc)
391 archiving [==========================================>] 3/3\r (no-eol) (esc)
392 archiving [==========================================>] 3/3\r (no-eol) (esc)
368 archiving [==========================================>] 3/3\r (no-eol) (esc)
393 \r (no-eol) (esc)
369 \r (no-eol) (esc)
394 \r (no-eol) (esc)
370 \r (no-eol) (esc)
@@ -403,12 +379,8 b' cloned:'
403 \r (no-eol) (esc)
379 \r (no-eol) (esc)
404 \r (no-eol) (esc)
380 \r (no-eol) (esc)
405 archiving (foo) [ ] 0/3\r (no-eol) (esc)
381 archiving (foo) [ ] 0/3\r (no-eol) (esc)
406 archiving (foo) [ ] 0/3\r (no-eol) (esc)
407 archiving (foo) [===========> ] 1/3\r (no-eol) (esc)
408 archiving (foo) [===========> ] 1/3\r (no-eol) (esc)
382 archiving (foo) [===========> ] 1/3\r (no-eol) (esc)
409 archiving (foo) [=======================> ] 2/3\r (no-eol) (esc)
383 archiving (foo) [=======================> ] 2/3\r (no-eol) (esc)
410 archiving (foo) [=======================> ] 2/3\r (no-eol) (esc)
411 archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
412 archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
384 archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
413 \r (no-eol) (esc)
385 \r (no-eol) (esc)
414 \r (no-eol) (esc)
386 \r (no-eol) (esc)
@@ -420,10 +392,8 b' cloned:'
420 linking [ <=> ] 6\r (no-eol) (esc)
392 linking [ <=> ] 6\r (no-eol) (esc)
421 \r (no-eol) (esc)
393 \r (no-eol) (esc)
422 \r (no-eol) (esc)
394 \r (no-eol) (esc)
423 archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc)
395 archiving (foo/bar) [ ] 0/1\r (no-eol) (esc)
424 archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc)
396 archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc)
425 archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc)
426 archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc)
427 \r (no-eol) (esc)
397 \r (no-eol) (esc)
428 cloning subrepo foo from $TESTTMP/repo/foo
398 cloning subrepo foo from $TESTTMP/repo/foo
429 cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob)
399 cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob)
General Comments 0
You need to be logged in to leave comments. Login now