Show More
@@ -192,13 +192,15 b' test delay time estimates' | |||
|
192 | 192 | > class mocktime(object): |
|
193 | 193 | > def __init__(self, increment): |
|
194 | 194 | > self.time = 0 |
|
195 | > self.increment = increment | |
|
195 | > self.increment = [int(s) for s in increment.split()] | |
|
196 | > self.pos = 0 | |
|
196 | 197 | > def __call__(self): |
|
197 | > self.time += self.increment | |
|
198 | > self.time += self.increment[self.pos % len(self.increment)] | |
|
199 | > self.pos += 1 | |
|
198 | 200 | > return self.time |
|
199 | 201 | > |
|
200 | 202 | > def uisetup(ui): |
|
201 |
> time.time = mocktime |
|
|
203 | > time.time = mocktime(os.environ.get('MOCKTIME', '11')) | |
|
202 | 204 | > EOF |
|
203 | 205 | |
|
204 | 206 | $ cp $HGRCPATH.orig $HGRCPATH |
@@ -246,6 +248,31 b' test delay time estimates' | |||
|
246 | 248 | loop [=============================> ] 3/4 23w02d\r (no-eol) (esc) |
|
247 | 249 | \r (no-eol) (esc) |
|
248 | 250 | |
|
251 | Non-linear progress: | |
|
252 | ||
|
253 | $ MOCKTIME='20 20 20 20 20 20 20 20 20 20 500 500 500 500 500 20 20 20 20 20' hg -y loop 20 | |
|
254 | \r (no-eol) (esc) | |
|
255 | loop [=> ] 1/20 6m21s\r (no-eol) (esc) | |
|
256 | loop [===> ] 2/20 6m01s\r (no-eol) (esc) | |
|
257 | loop [=====> ] 3/20 5m41s\r (no-eol) (esc) | |
|
258 | loop [=======> ] 4/20 5m21s\r (no-eol) (esc) | |
|
259 | loop [=========> ] 5/20 5m01s\r (no-eol) (esc) | |
|
260 | loop [===========> ] 6/20 4m41s\r (no-eol) (esc) | |
|
261 | loop [=============> ] 7/20 4m21s\r (no-eol) (esc) | |
|
262 | loop [===============> ] 8/20 4m01s\r (no-eol) (esc) | |
|
263 | loop [================> ] 9/20 13m27s\r (no-eol) (esc) | |
|
264 | loop [==================> ] 10/20 19m21s\r (no-eol) (esc) | |
|
265 | loop [====================> ] 11/20 22m39s\r (no-eol) (esc) | |
|
266 | loop [======================> ] 12/20 24m01s\r (no-eol) (esc) | |
|
267 | loop [========================> ] 13/20 23m53s\r (no-eol) (esc) | |
|
268 | loop [==========================> ] 14/20 19m09s\r (no-eol) (esc) | |
|
269 | loop [============================> ] 15/20 15m01s\r (no-eol) (esc) | |
|
270 | loop [==============================> ] 16/20 11m21s\r (no-eol) (esc) | |
|
271 | loop [=================================> ] 17/20 8m04s\r (no-eol) (esc) | |
|
272 | loop [===================================> ] 18/20 5m07s\r (no-eol) (esc) | |
|
273 | loop [=====================================> ] 19/20 2m27s\r (no-eol) (esc) | |
|
274 | \r (no-eol) (esc) | |
|
275 | ||
|
249 | 276 | Time estimates should not fail when there's no end point: |
|
250 | 277 | $ hg -y loop -- -4 |
|
251 | 278 | \r (no-eol) (esc) |
General Comments 0
You need to be logged in to leave comments.
Login now