equal
deleted
inserted
replaced
20 def shouldprint(ui): |
20 def shouldprint(ui): |
21 return not (ui.quiet or ui.plain()) and ( |
21 return not (ui.quiet or ui.plain()) and ( |
22 ui._isatty(sys.stderr) or ui.configbool('progress', 'assume-tty')) |
22 ui._isatty(sys.stderr) or ui.configbool('progress', 'assume-tty')) |
23 |
23 |
24 def fmtremaining(seconds): |
24 def fmtremaining(seconds): |
25 """format a number of remaining seconds in humain readable way |
25 """format a number of remaining seconds in human readable way |
26 |
26 |
27 This will properly display seconds, minutes, hours, days if needed""" |
27 This will properly display seconds, minutes, hours, days if needed""" |
28 if seconds < 60: |
28 if seconds < 60: |
29 # i18n: format XX seconds as "XXs" |
29 # i18n: format XX seconds as "XXs" |
30 return _("%02ds") % (seconds) |
30 return _("%02ds") % (seconds) |