Commit Graph

10 Commits

Author SHA1 Message Date
Matt Mackall
8971e5af3c check-code: fix issues with finding patterns in unified tests, fix tests
- old-style patterns without ^ were getting improperly anchored
- finditer was matching against beginning of line poorly
- \s was matching newlines
- [^x] was matching newlines

so we:

- remove earlier hacks for multiline matching
- fix unified test anchoring by adding .*
- replace \s with [ \t]
- replace [^x] with [^\nx]
- force all matches into multiline mode so ^ anchors work

This uncovers a number of test issues that are then repaired.
2011-10-27 17:22:04 -05:00
Augie Fackler
c679d5be7b progress: add a changedelay to prevent parallel topics from flapping (issue2698)
When combined with the earlier change to make the progress object
truly a singleton, this prevents the progress bar swapping on 'hg
clone --pull' on a local filesystem.

Thanks to timeless for lots of debugging help at the Copenhagen sprint
to isolate the root cause of this and a first draft an idea that would
fix it.
2011-06-23 15:00:45 -05:00
timeless
1df4cf63b6 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...
2011-01-02 18:51:59 +02:00
Augie Fackler
fe6b4b14cf progress: don't compute estimate without a total
Without this, computing an estimate crashes. Test included.
2010-12-16 07:45:22 -06:00
Augie Fackler
5de2d97578 progress using tests: disable time estimates to avoid flakiness 2010-12-15 10:55:14 -06:00
Augie Fackler
61faaef57b test-progress: test completion estimates and progress bar delay 2010-12-15 11:20:32 -06:00
Martin Geisler
a86cb6d064 progress: test setting progress.width
This also makes the tests readable in a 80-character terminal which is
why I made the change to both tests.
2010-12-15 16:35:09 +01:00
Martin Geisler
0433940880 tests: add filtercr.py helper for progress tests
The two tests that used filtercr.py already used a slightly different
version, which explains why test-convert-svn-move.t changed after
switching to using $TESTDIR/filtercr.py.
2010-12-15 16:29:46 +01:00
Mads Kiilerich
635406bf76 tests: use (esc) for all non-ASCII test output 2010-11-08 01:41:41 +01:00
Matt Mackall
5cf7b705da tests: unify test-progress 2010-09-26 13:44:49 -05:00