Mercurial > public > mercurial-scm > hg
diff tests/test-progress.t @ 13236:3f299f5d9a29
progress: handle days, weeks and years
using hg clone svn://anonsvn.kde.org/home/kde/trunk kde ... with progress
yields 3008/1210830 1314h56m, which is unusable.
Add code to switch to days at 30 hours, to weeks at 15 days, and to years
at 55 weeks. A day has 24 hours, a week has 7 days, and a year has 52 weeks.
Months are intentionally omitted because they do not have a fixed length. The
Use of 52 weeks is a known and understandable estimate for a year.
It might make sense to spell our year to alert people when progress is
impractical, but...
author | timeless <timeless@gmail.com> |
---|---|
date | Sun, 02 Jan 2011 18:51:59 +0200 |
parents | e11c14f14491 |
children | 5d261fd00446 |
line wrap: on
line diff
--- a/tests/test-progress.t Sun Jan 02 19:34:41 2011 +0100 +++ b/tests/test-progress.t Sun Jan 02 18:51:59 2011 +0200 @@ -141,6 +141,23 @@ loop [==============================> ] 3/4 2h47m \r (esc) + $ MOCKTIME=1000000 hg -y loop 4 2>&1 | python $TESTDIR/filtercr.py + + loop [ ] 0/4 + loop [=========> ] 1/4 5w00d + loop [====================> ] 2/4 3w03d + loop [=============================> ] 3/4 11d14h + \r (esc) + + + $ MOCKTIME=14000000 hg -y loop 4 2>&1 | python $TESTDIR/filtercr.py + + loop [ ] 0/4 + loop [=========> ] 1/4 1y18w + loop [===================> ] 2/4 46w03d + loop [=============================> ] 3/4 23w02d + \r (esc) + Time estimates should not fail when there's no end point: $ hg -y loop -- -4 2>&1 | python $TESTDIR/filtercr.py