author | Matt Mackall <mpm@selenic.com> |
Mon, 07 Mar 2011 15:46:46 -0600 | |
changeset 13558 | f854b775c386 |
parent 13236 | 3f299f5d9a29 |
child 14838 | 5d261fd00446 |
permissions | -rw-r--r-- |
10465
5d7e84e7ac6d
Add test for progress extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
1 |
|
12479
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
2 |
$ cat > loop.py <<EOF |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
3 |
> from mercurial import commands |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
4 |
> |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
5 |
> def loop(ui, loops, **opts): |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
6 |
> loops = int(loops) |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
7 |
> total = None |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
8 |
> if loops >= 0: |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
9 |
> total = loops |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
10 |
> if opts.get('total', None): |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
11 |
> total = int(opts.get('total')) |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
12 |
> loops = abs(loops) |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
13 |
> |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
14 |
> for i in range(loops): |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
15 |
> ui.progress('loop', i, 'loop.%d' % i, 'loopnum', total) |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
16 |
> ui.progress('loop', None, 'loop.done', 'loopnum', total) |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
17 |
> |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
18 |
> commands.norepo += " loop" |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
19 |
> |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
20 |
> cmdtable = { |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
21 |
> "loop": (loop, [('', 'total', '', 'override for total')], |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
22 |
> 'hg loop LOOPS'), |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
23 |
> } |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
24 |
> EOF |
10465
5d7e84e7ac6d
Add test for progress extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
25 |
|
12479
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
26 |
$ echo "[extensions]" >> $HGRCPATH |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
27 |
$ echo "progress=" >> $HGRCPATH |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
28 |
$ echo "loop=`pwd`/loop.py" >> $HGRCPATH |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
29 |
$ echo "[progress]" >> $HGRCPATH |
13149
735dd8e8a208
progress using tests: disable time estimates to avoid flakiness
Augie Fackler <durin42@gmail.com>
parents:
13145
diff
changeset
|
30 |
$ echo "format = topic bar number" >> $HGRCPATH |
12479
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
31 |
$ echo "assume-tty=1" >> $HGRCPATH |
13142
e9827c85c50b
progress: test setting progress.width
Martin Geisler <mg@aragost.com>
parents:
13141
diff
changeset
|
32 |
$ echo "width=60" >> $HGRCPATH |
12479
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
33 |
|
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
34 |
test default params, display nothing because of delay |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
35 |
|
13141
6cfe17c19ba2
tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
12942
diff
changeset
|
36 |
$ hg -y loop 3 2>&1 | $TESTDIR/filtercr.py |
12479
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
37 |
|
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
38 |
$ echo "delay=0" >> $HGRCPATH |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
39 |
$ echo "refresh=0" >> $HGRCPATH |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
40 |
|
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
41 |
test with delay=0, refresh=0 |
10465
5d7e84e7ac6d
Add test for progress extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
42 |
|
13141
6cfe17c19ba2
tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
12942
diff
changeset
|
43 |
$ hg -y loop 3 2>&1 | $TESTDIR/filtercr.py |
12479
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
44 |
|
13142
e9827c85c50b
progress: test setting progress.width
Martin Geisler <mg@aragost.com>
parents:
13141
diff
changeset
|
45 |
loop [ ] 0/3 |
e9827c85c50b
progress: test setting progress.width
Martin Geisler <mg@aragost.com>
parents:
13141
diff
changeset
|
46 |
loop [===============> ] 1/3 |
e9827c85c50b
progress: test setting progress.width
Martin Geisler <mg@aragost.com>
parents:
13141
diff
changeset
|
47 |
loop [===============================> ] 2/3 |
e9827c85c50b
progress: test setting progress.width
Martin Geisler <mg@aragost.com>
parents:
13141
diff
changeset
|
48 |
\r (esc) |
12479
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
49 |
|
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
50 |
test refresh is taken in account |
10465
5d7e84e7ac6d
Add test for progress extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
51 |
|
13141
6cfe17c19ba2
tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
12942
diff
changeset
|
52 |
$ hg -y --config progress.refresh=100 loop 3 2>&1 | $TESTDIR/filtercr.py |
12479
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
53 |
|
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
54 |
|
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
55 |
test format options 1 |
10465
5d7e84e7ac6d
Add test for progress extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
56 |
|
13141
6cfe17c19ba2
tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
12942
diff
changeset
|
57 |
$ hg -y --config 'progress.format=number topic item+2' loop 2 2>&1 \ |
6cfe17c19ba2
tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
12942
diff
changeset
|
58 |
> | $TESTDIR/filtercr.py |
12479
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
59 |
|
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
60 |
0/2 loop lo |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
61 |
1/2 loop lo |
13142
e9827c85c50b
progress: test setting progress.width
Martin Geisler <mg@aragost.com>
parents:
13141
diff
changeset
|
62 |
\r (esc) |
10465
5d7e84e7ac6d
Add test for progress extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
63 |
|
12479
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
64 |
test format options 2 |
10465
5d7e84e7ac6d
Add test for progress extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
65 |
|
13141
6cfe17c19ba2
tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
12942
diff
changeset
|
66 |
$ hg -y --config 'progress.format=number item-3 bar' loop 2 2>&1 \ |
6cfe17c19ba2
tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
12942
diff
changeset
|
67 |
> | $TESTDIR/filtercr.py |
12479
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
68 |
|
13142
e9827c85c50b
progress: test setting progress.width
Martin Geisler <mg@aragost.com>
parents:
13141
diff
changeset
|
69 |
0/2 p.0 [ ] |
e9827c85c50b
progress: test setting progress.width
Martin Geisler <mg@aragost.com>
parents:
13141
diff
changeset
|
70 |
1/2 p.1 [=======================> ] |
e9827c85c50b
progress: test setting progress.width
Martin Geisler <mg@aragost.com>
parents:
13141
diff
changeset
|
71 |
\r (esc) |
10465
5d7e84e7ac6d
Add test for progress extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
72 |
|
12479
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
73 |
test format options and indeterminate progress |
10465
5d7e84e7ac6d
Add test for progress extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
74 |
|
13141
6cfe17c19ba2
tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
12942
diff
changeset
|
75 |
$ hg -y --config 'progress.format=number item bar' loop -- -2 2>&1 \ |
6cfe17c19ba2
tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
12942
diff
changeset
|
76 |
> | $TESTDIR/filtercr.py |
12479
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
77 |
|
13142
e9827c85c50b
progress: test setting progress.width
Martin Geisler <mg@aragost.com>
parents:
13141
diff
changeset
|
78 |
0 loop.0 [ <=> ] |
e9827c85c50b
progress: test setting progress.width
Martin Geisler <mg@aragost.com>
parents:
13141
diff
changeset
|
79 |
1 loop.1 [ <=> ] |
e9827c85c50b
progress: test setting progress.width
Martin Geisler <mg@aragost.com>
parents:
13141
diff
changeset
|
80 |
\r (esc) |
10465
5d7e84e7ac6d
Add test for progress extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
81 |
|
12479
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
82 |
make sure things don't fall over if count > total |
10465
5d7e84e7ac6d
Add test for progress extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
83 |
|
13141
6cfe17c19ba2
tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
12942
diff
changeset
|
84 |
$ hg -y loop --total 4 6 2>&1 | $TESTDIR/filtercr.py |
12479
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
85 |
|
13142
e9827c85c50b
progress: test setting progress.width
Martin Geisler <mg@aragost.com>
parents:
13141
diff
changeset
|
86 |
loop [ ] 0/4 |
e9827c85c50b
progress: test setting progress.width
Martin Geisler <mg@aragost.com>
parents:
13141
diff
changeset
|
87 |
loop [===========> ] 1/4 |
e9827c85c50b
progress: test setting progress.width
Martin Geisler <mg@aragost.com>
parents:
13141
diff
changeset
|
88 |
loop [=======================> ] 2/4 |
e9827c85c50b
progress: test setting progress.width
Martin Geisler <mg@aragost.com>
parents:
13141
diff
changeset
|
89 |
loop [===================================> ] 3/4 |
e9827c85c50b
progress: test setting progress.width
Martin Geisler <mg@aragost.com>
parents:
13141
diff
changeset
|
90 |
loop [===============================================>] 4/4 |
e9827c85c50b
progress: test setting progress.width
Martin Geisler <mg@aragost.com>
parents:
13141
diff
changeset
|
91 |
loop [ <=> ] 5/4 |
e9827c85c50b
progress: test setting progress.width
Martin Geisler <mg@aragost.com>
parents:
13141
diff
changeset
|
92 |
\r (esc) |
10891
83af68e38be3
progress: fall back to indeterminate progress if position is >= total
Augie Fackler <durin42@gmail.com>
parents:
10788
diff
changeset
|
93 |
|
12479
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
94 |
test immediate progress completion |
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
95 |
|
13141
6cfe17c19ba2
tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
12942
diff
changeset
|
96 |
$ hg -y loop 0 2>&1 | $TESTDIR/filtercr.py |
12479
2f9ef3657730
tests: unify test-progress
Matt Mackall <mpm@selenic.com>
parents:
10891
diff
changeset
|
97 |
|
13145
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
98 |
|
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
99 |
test delay time estimates |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
100 |
|
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
101 |
$ cat > mocktime.py <<EOF |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
102 |
> import os |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
103 |
> import time |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
104 |
> |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
105 |
> class mocktime(object): |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
106 |
> def __init__(self, increment): |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
107 |
> self.time = 0 |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
108 |
> self.increment = increment |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
109 |
> def __call__(self): |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
110 |
> self.time += self.increment |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
111 |
> return self.time |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
112 |
> |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
113 |
> def uisetup(ui): |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
114 |
> time.time = mocktime(int(os.environ.get('MOCKTIME', '11'))) |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
115 |
> EOF |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
116 |
|
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
117 |
$ echo "[extensions]" > $HGRCPATH |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
118 |
$ echo "mocktime=`pwd`/mocktime.py" >> $HGRCPATH |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
119 |
$ echo "progress=" >> $HGRCPATH |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
120 |
$ echo "loop=`pwd`/loop.py" >> $HGRCPATH |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
121 |
$ echo "[progress]" >> $HGRCPATH |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
122 |
$ echo "assume-tty=1" >> $HGRCPATH |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
123 |
$ echo "delay=25" >> $HGRCPATH |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
124 |
$ echo "width=60" >> $HGRCPATH |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
125 |
|
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
126 |
$ hg -y loop 8 2>&1 | python $TESTDIR/filtercr.py |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
127 |
|
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
128 |
loop [=========> ] 2/8 1m07s |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
129 |
loop [===============> ] 3/8 56s |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
130 |
loop [=====================> ] 4/8 45s |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
131 |
loop [==========================> ] 5/8 34s |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
132 |
loop [================================> ] 6/8 23s |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
133 |
loop [=====================================> ] 7/8 12s |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
134 |
\r (esc) |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
135 |
|
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
136 |
$ MOCKTIME=10000 hg -y loop 4 2>&1 | python $TESTDIR/filtercr.py |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
137 |
|
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
138 |
loop [ ] 0/4 |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
139 |
loop [=========> ] 1/4 8h21m |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
140 |
loop [====================> ] 2/4 5h34m |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
141 |
loop [==============================> ] 3/4 2h47m |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
142 |
\r (esc) |
ce4cd176634e
test-progress: test completion estimates and progress bar delay
Augie Fackler <durin42@gmail.com>
parents:
13142
diff
changeset
|
143 |
|
13236
3f299f5d9a29
progress: handle days, weeks and years
timeless <timeless@gmail.com>
parents:
13154
diff
changeset
|
144 |
$ MOCKTIME=1000000 hg -y loop 4 2>&1 | python $TESTDIR/filtercr.py |
3f299f5d9a29
progress: handle days, weeks and years
timeless <timeless@gmail.com>
parents:
13154
diff
changeset
|
145 |
|
3f299f5d9a29
progress: handle days, weeks and years
timeless <timeless@gmail.com>
parents:
13154
diff
changeset
|
146 |
loop [ ] 0/4 |
3f299f5d9a29
progress: handle days, weeks and years
timeless <timeless@gmail.com>
parents:
13154
diff
changeset
|
147 |
loop [=========> ] 1/4 5w00d |
3f299f5d9a29
progress: handle days, weeks and years
timeless <timeless@gmail.com>
parents:
13154
diff
changeset
|
148 |
loop [====================> ] 2/4 3w03d |
3f299f5d9a29
progress: handle days, weeks and years
timeless <timeless@gmail.com>
parents:
13154
diff
changeset
|
149 |
loop [=============================> ] 3/4 11d14h |
3f299f5d9a29
progress: handle days, weeks and years
timeless <timeless@gmail.com>
parents:
13154
diff
changeset
|
150 |
\r (esc) |
3f299f5d9a29
progress: handle days, weeks and years
timeless <timeless@gmail.com>
parents:
13154
diff
changeset
|
151 |
|
3f299f5d9a29
progress: handle days, weeks and years
timeless <timeless@gmail.com>
parents:
13154
diff
changeset
|
152 |
|
3f299f5d9a29
progress: handle days, weeks and years
timeless <timeless@gmail.com>
parents:
13154
diff
changeset
|
153 |
$ MOCKTIME=14000000 hg -y loop 4 2>&1 | python $TESTDIR/filtercr.py |
3f299f5d9a29
progress: handle days, weeks and years
timeless <timeless@gmail.com>
parents:
13154
diff
changeset
|
154 |
|
3f299f5d9a29
progress: handle days, weeks and years
timeless <timeless@gmail.com>
parents:
13154
diff
changeset
|
155 |
loop [ ] 0/4 |
3f299f5d9a29
progress: handle days, weeks and years
timeless <timeless@gmail.com>
parents:
13154
diff
changeset
|
156 |
loop [=========> ] 1/4 1y18w |
3f299f5d9a29
progress: handle days, weeks and years
timeless <timeless@gmail.com>
parents:
13154
diff
changeset
|
157 |
loop [===================> ] 2/4 46w03d |
3f299f5d9a29
progress: handle days, weeks and years
timeless <timeless@gmail.com>
parents:
13154
diff
changeset
|
158 |
loop [=============================> ] 3/4 23w02d |
3f299f5d9a29
progress: handle days, weeks and years
timeless <timeless@gmail.com>
parents:
13154
diff
changeset
|
159 |
\r (esc) |
3f299f5d9a29
progress: handle days, weeks and years
timeless <timeless@gmail.com>
parents:
13154
diff
changeset
|
160 |
|
13154
e11c14f14491
progress: don't compute estimate without a total
Augie Fackler <durin42@gmail.com>
parents:
13149
diff
changeset
|
161 |
Time estimates should not fail when there's no end point: |
e11c14f14491
progress: don't compute estimate without a total
Augie Fackler <durin42@gmail.com>
parents:
13149
diff
changeset
|
162 |
$ hg -y loop -- -4 2>&1 | python $TESTDIR/filtercr.py |
e11c14f14491
progress: don't compute estimate without a total
Augie Fackler <durin42@gmail.com>
parents:
13149
diff
changeset
|
163 |
|
e11c14f14491
progress: don't compute estimate without a total
Augie Fackler <durin42@gmail.com>
parents:
13149
diff
changeset
|
164 |
loop [ <=> ] 2 |
e11c14f14491
progress: don't compute estimate without a total
Augie Fackler <durin42@gmail.com>
parents:
13149
diff
changeset
|
165 |
loop [ <=> ] 3 |
e11c14f14491
progress: don't compute estimate without a total
Augie Fackler <durin42@gmail.com>
parents:
13149
diff
changeset
|
166 |
\r (esc) |