Mercurial > hg
annotate tests/bundles/rebase.sh @ 18091:f7f8159caad3
ancestor: add lazy membership testing to lazyancestors
This also makes the perfancestorset command use lazy membership testing. In a
linear repository with over 400,000 commits, without this patch, hg
perfancestorset takes 0.80 seconds no matter how far behind we're looking.
With this patch, hg perfancestorset -- X takes:
Rev X Time
-1 0.00s
-4000 0.01s
-20000 0.04s
-80000 0.17s
-200000 0.43s
-300000 0.69s
0 0.88s
Thus, for revisions close to tip, we're up to several orders of magnitude
faster. At 0 we're around 10% slower.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Tue, 18 Dec 2012 12:47:20 -0800 |
parents | 624e5ce615ec |
children | 5d57b2101ab1 |
rev | line source |
---|---|
14118
7fd8e597f99c
tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
1 #!/bin/bash |
7fd8e597f99c
tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
2 hg init rebase |
7fd8e597f99c
tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
3 cd rebase |
7fd8e597f99c
tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
4 |
14119
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
5 # @ 7: 'H' |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
6 # | |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
7 # | o 6: 'G' |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
8 # |/| |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
9 # o | 5: 'F' |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
10 # | | |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
11 # | o 4: 'E' |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
12 # |/ |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
13 # | o 3: 'D' |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
14 # | | |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
15 # | o 2: 'C' |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
16 # | | |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
17 # | o 1: 'B' |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
18 # |/ |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
19 # o 0: 'A' |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
20 |
14118
7fd8e597f99c
tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
21 echo A > A |
7fd8e597f99c
tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
22 hg ci -Am A |
7fd8e597f99c
tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
23 echo B > B |
7fd8e597f99c
tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
24 hg ci -Am B |
7fd8e597f99c
tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
25 echo C > C |
7fd8e597f99c
tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
26 hg ci -Am C |
7fd8e597f99c
tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
27 echo D > D |
7fd8e597f99c
tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
28 hg ci -Am D |
14119
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
29 hg up -q -C 0 |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
30 echo E > E |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
31 hg ci -Am E |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
32 hg up -q -C 0 |
14118
7fd8e597f99c
tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
33 echo F > F |
7fd8e597f99c
tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
34 hg ci -Am F |
14119
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
35 hg merge -r 4 |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
36 hg ci -m G |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
37 hg up -q -C 5 |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
38 echo H > H |
624e5ce615ec
tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
14118
diff
changeset
|
39 hg ci -Am H |
14118
7fd8e597f99c
tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
40 |
7fd8e597f99c
tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
41 hg bundle -a ../rebase.hg |
7fd8e597f99c
tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
42 |
7fd8e597f99c
tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
43 cd .. |
7fd8e597f99c
tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
44 rm -Rf rebase |