mercurial/progress.py
changeset 26781 1aee2ab0f902
parent 26407 72bccc1f26b1
child 28171 2d20d1d2ea76
equal deleted inserted replaced
26780:bbf544b5f2e9 26781:1aee2ab0f902
    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)