| 1 |
#require no-pure |
| 2 |
|
| 3 |
A script to generate nasty diff worst-case scenarios: |
| 4 |
|
| 5 |
$ cat > s.py <<EOF |
| 6 |
> import random |
| 7 |
> for x in range(100000): |
| 8 |
> print |
| 9 |
> if random.randint(0, 100) >= 50: |
| 10 |
> x += 1 |
| 11 |
> print(hex(x)) |
| 12 |
> EOF |
| 13 |
|
| 14 |
$ hg init a |
| 15 |
$ cd a |
| 16 |
|
| 17 |
Check in a big file: |
| 18 |
|
| 19 |
$ "$PYTHON" ../s.py > a |
| 20 |
$ hg ci -qAm0 |
| 21 |
|
| 22 |
Modify it: |
| 23 |
|
| 24 |
$ "$PYTHON" ../s.py > a |
| 25 |
|
| 26 |
Time a check-in, should never take more than 10 seconds user time: |
| 27 |
|
| 28 |
$ hg ci --time -m1 --config worker.enabled=no |
| 29 |
time: real .* secs .user [0-9][.].* sys .* (re) |