Mercurial > hg
annotate tests/test-empty-group.t @ 40680:9d88ae5c635b
perf: add a `setup` argument to run code outside of the timed section
With this new argument, it is possible to perform special setup and cleanup
outside of code actually timed. This is useful to provide more accurate
benchmark.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Mon, 19 Nov 2018 22:55:07 +0000 |
parents | eb586ed5d8ce |
children |
rev | line source |
---|---|
4659
7a7d4937272b
Kill trailing spaces
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3853
diff
changeset
|
1 # A B |
7a7d4937272b
Kill trailing spaces
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3853
diff
changeset
|
2 # |
7a7d4937272b
Kill trailing spaces
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3853
diff
changeset
|
3 # 3 4 3 |
7a7d4937272b
Kill trailing spaces
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3853
diff
changeset
|
4 # |\/| |\ |
7a7d4937272b
Kill trailing spaces
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3853
diff
changeset
|
5 # |/\| | \ |
7a7d4937272b
Kill trailing spaces
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3853
diff
changeset
|
6 # 1 2 1 2 |
7a7d4937272b
Kill trailing spaces
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3853
diff
changeset
|
7 # \ / \ / |
2339
11422943cf72
document and fix findincoming
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
8 # 0 0 |
11422943cf72
document and fix findincoming
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
9 # |
11422943cf72
document and fix findincoming
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
10 # if the result of the merge of 1 and 2 |
11422943cf72
document and fix findincoming
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
11 # is the same in 3 and 4, no new manifest |
11422943cf72
document and fix findincoming
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
12 # will be created and the manifest group |
11422943cf72
document and fix findincoming
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
13 # will be empty during the pull |
11422943cf72
document and fix findincoming
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
14 # |
11422943cf72
document and fix findincoming
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
15 # (plus we test a failure where outgoing |
11422943cf72
document and fix findincoming
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
16 # wrongly reported the number of csets) |
11422943cf72
document and fix findincoming
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
17 |
12189
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
18 $ hg init a |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
19 $ cd a |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
20 $ touch init |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
21 $ hg ci -A -m 0 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
22 adding init |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
23 $ touch x y |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
24 $ hg ci -A -m 1 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
25 adding x |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
26 adding y |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
27 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
28 $ hg update 0 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
29 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
30 $ touch x y |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
31 $ hg ci -A -m 2 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
32 adding x |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
33 adding y |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
34 created new head |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
35 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
36 $ hg merge 1 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
37 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
38 (branch merge, don't forget to commit) |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
39 $ hg ci -A -m m1 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
40 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
41 $ hg update -C 1 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
42 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
43 $ hg merge 2 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
44 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
45 (branch merge, don't forget to commit) |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
46 $ hg ci -A -m m2 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
47 created new head |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
48 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
49 $ cd .. |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
50 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
51 $ hg clone -r 3 a b |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
52 adding changesets |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
53 adding manifests |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
54 adding file changes |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
55 added 4 changesets with 3 changes to 3 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
14162
diff
changeset
|
56 new changesets 5fcb73622933:d15a0c284984 |
12189
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
57 updating to branch default |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
58 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
59 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
60 $ hg clone -r 4 a c |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
61 adding changesets |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
62 adding manifests |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
63 adding file changes |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
64 added 4 changesets with 3 changes to 3 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
14162
diff
changeset
|
65 new changesets 5fcb73622933:1ec3c74fc0e0 |
12189
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
66 updating to branch default |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
67 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
2339
11422943cf72
document and fix findincoming
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
68 |
12189
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
69 $ hg -R a outgoing b |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
70 comparing with b |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
71 searching for changes |
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
12847
diff
changeset
|
72 changeset: 4:1ec3c74fc0e0 |
12189
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
73 tag: tip |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
74 parent: 1:79f9e10cd04e |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
75 parent: 2:8e1bb01c1a24 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
76 user: test |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
77 date: Thu Jan 01 00:00:00 1970 +0000 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
78 summary: m2 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
79 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
80 $ hg -R a outgoing c |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
81 comparing with c |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
82 searching for changes |
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
12847
diff
changeset
|
83 changeset: 3:d15a0c284984 |
12189
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
84 parent: 2:8e1bb01c1a24 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
85 parent: 1:79f9e10cd04e |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
86 user: test |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
87 date: Thu Jan 01 00:00:00 1970 +0000 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
88 summary: m1 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
89 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
90 $ hg -R b outgoing c |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
91 comparing with c |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
92 searching for changes |
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
12847
diff
changeset
|
93 changeset: 3:d15a0c284984 |
12189
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
94 tag: tip |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
95 parent: 2:8e1bb01c1a24 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
96 parent: 1:79f9e10cd04e |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
97 user: test |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
98 date: Thu Jan 01 00:00:00 1970 +0000 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
99 summary: m1 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
100 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
101 $ hg -R c outgoing b |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
102 comparing with b |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
103 searching for changes |
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
12847
diff
changeset
|
104 changeset: 3:1ec3c74fc0e0 |
12189
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
105 tag: tip |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
106 parent: 1:79f9e10cd04e |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
107 parent: 2:8e1bb01c1a24 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
108 user: test |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
109 date: Thu Jan 01 00:00:00 1970 +0000 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
110 summary: m2 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
111 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
112 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
113 $ hg -R b pull a |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
114 pulling from a |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
115 searching for changes |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
116 adding changesets |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
117 adding manifests |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
118 adding file changes |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
119 added 1 changesets with 0 changes to 0 files (+1 heads) |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
14162
diff
changeset
|
120 new changesets 1ec3c74fc0e0 |
12189
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
121 (run 'hg heads' to see heads, 'hg merge' to merge) |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
122 |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
123 $ hg -R c pull a |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
124 pulling from a |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
125 searching for changes |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
126 adding changesets |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
127 adding manifests |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
128 adding file changes |
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
129 added 1 changesets with 0 changes to 0 files (+1 heads) |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
14162
diff
changeset
|
130 new changesets d15a0c284984 |
12189
fb0c6373ec36
tests: unify test-empty-group
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
131 (run 'hg heads' to see heads, 'hg merge' to merge) |