annotate tests/test-setdiscovery.t @ 26939:50d2389a2e49

resolve: choose where .orig file locations are kept Having your working copy littered with .orig files is a common HG complaint. This patch uses the cmd.origpath helper function to let the user specify where they should be kept when using the resolve command.
author Christian Delahousse <cdelahousse@fb.com>
date Tue, 10 Nov 2015 14:26:19 -0800
parents 1e8e0b01faba
children 77d25b913f80
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
1
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
2 Function to test discovery between two repos in both directions, using both the local shortcut
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
3 (which is currently not activated by default) and the full remotable protocol:
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
4
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
5 $ testdesc() { # revs_a, revs_b, dagdesc
14736
65f8f98aa924 tests: solaris [ doesn't know -e
Mads Kiilerich <mads@kiilerich.com>
parents: 14624
diff changeset
6 > if [ -d foo ]; then rm -rf foo; fi
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
7 > hg init foo
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
8 > cd foo
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
9 > hg debugbuilddag "$3"
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
10 > hg clone . a $1 --quiet
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
11 > hg clone . b $2 --quiet
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
12 > echo
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
13 > echo "% -- a -> b tree"
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
14 > hg -R a debugdiscovery b --verbose --old
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
15 > echo
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
16 > echo "% -- a -> b set"
25125
bd625cd4e5e7 progress: get the extremely verbose output out of default debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24361
diff changeset
17 > hg -R a debugdiscovery b --verbose --debug --config progress.debug=true
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
18 > echo
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
19 > echo "% -- b -> a tree"
25125
bd625cd4e5e7 progress: get the extremely verbose output out of default debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24361
diff changeset
20 > hg -R b debugdiscovery a --verbose --old --config
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
21 > echo
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
22 > echo "% -- b -> a set"
25125
bd625cd4e5e7 progress: get the extremely verbose output out of default debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24361
diff changeset
23 > hg -R b debugdiscovery a --verbose --debug --config progress.debug=true
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
24 > cd ..
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
25 > }
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
26
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
27
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
28 Small superset:
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
29
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
30 $ testdesc '-ra1 -ra2' '-rb1 -rb2 -rb3' '
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
31 > +2:f +1:a1:b1
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
32 > <f +4 :a2
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
33 > +5 :b2
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
34 > <f +3 :b3'
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
35
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
36 % -- a -> b tree
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
37 comparing with b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
38 searching for changes
18254
2dfe519d435d debugdiscovery: report heads in sorted order
Mads Kiilerich <mads at kiilerich.com>
parents: 16913
diff changeset
39 unpruned common: 01241442b3c2 66f7d451a68b b5714e113bc0
2dfe519d435d debugdiscovery: report heads in sorted order
Mads Kiilerich <mads at kiilerich.com>
parents: 16913
diff changeset
40 common heads: 01241442b3c2 b5714e113bc0
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
41 local is subset
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
42
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
43 % -- a -> b set
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
44 comparing with b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
45 query 1; heads
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
46 searching for changes
14624
f03c82d1f50a setdiscovery: batch heads and known(ownheads)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14164
diff changeset
47 all local heads known remotely
18254
2dfe519d435d debugdiscovery: report heads in sorted order
Mads Kiilerich <mads at kiilerich.com>
parents: 16913
diff changeset
48 common heads: 01241442b3c2 b5714e113bc0
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
49 local is subset
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
50
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
51 % -- b -> a tree
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
52 comparing with a
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
53 searching for changes
18254
2dfe519d435d debugdiscovery: report heads in sorted order
Mads Kiilerich <mads at kiilerich.com>
parents: 16913
diff changeset
54 unpruned common: 01241442b3c2 b5714e113bc0
2dfe519d435d debugdiscovery: report heads in sorted order
Mads Kiilerich <mads at kiilerich.com>
parents: 16913
diff changeset
55 common heads: 01241442b3c2 b5714e113bc0
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
56 remote is subset
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
57
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
58 % -- b -> a set
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
59 comparing with a
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
60 query 1; heads
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
61 searching for changes
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
62 all remote heads known locally
18254
2dfe519d435d debugdiscovery: report heads in sorted order
Mads Kiilerich <mads at kiilerich.com>
parents: 16913
diff changeset
63 common heads: 01241442b3c2 b5714e113bc0
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
64 remote is subset
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
65
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
66
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
67 Many new:
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
68
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
69 $ testdesc '-ra1 -ra2' '-rb' '
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
70 > +2:f +3:a1 +3:b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
71 > <f +30 :a2'
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
72
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
73 % -- a -> b tree
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
74 comparing with b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
75 searching for changes
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
76 unpruned common: bebd167eb94d
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
77 common heads: bebd167eb94d
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
78
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
79 % -- a -> b set
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
80 comparing with b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
81 query 1; heads
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
82 searching for changes
14624
f03c82d1f50a setdiscovery: batch heads and known(ownheads)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14164
diff changeset
83 taking initial sample
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
84 searching: 2 queries
14624
f03c82d1f50a setdiscovery: batch heads and known(ownheads)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14164
diff changeset
85 query 2; still undecided: 29, sample size is: 29
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
86 2 total queries
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
87 common heads: bebd167eb94d
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
88
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
89 % -- b -> a tree
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
90 comparing with a
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
91 searching for changes
18254
2dfe519d435d debugdiscovery: report heads in sorted order
Mads Kiilerich <mads at kiilerich.com>
parents: 16913
diff changeset
92 unpruned common: 66f7d451a68b bebd167eb94d
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
93 common heads: bebd167eb94d
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
94
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
95 % -- b -> a set
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
96 comparing with a
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
97 query 1; heads
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
98 searching for changes
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
99 taking initial sample
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
100 searching: 2 queries
14624
f03c82d1f50a setdiscovery: batch heads and known(ownheads)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14164
diff changeset
101 query 2; still undecided: 2, sample size is: 2
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
102 2 total queries
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
103 common heads: bebd167eb94d
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
104
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
105
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
106 Both sides many new with stub:
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
107
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
108 $ testdesc '-ra1 -ra2' '-rb' '
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
109 > +2:f +2:a1 +30 :b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
110 > <f +30 :a2'
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
111
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
112 % -- a -> b tree
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
113 comparing with b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
114 searching for changes
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
115 unpruned common: 2dc09a01254d
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
116 common heads: 2dc09a01254d
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
117
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
118 % -- a -> b set
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
119 comparing with b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
120 query 1; heads
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
121 searching for changes
14624
f03c82d1f50a setdiscovery: batch heads and known(ownheads)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14164
diff changeset
122 taking initial sample
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
123 searching: 2 queries
14624
f03c82d1f50a setdiscovery: batch heads and known(ownheads)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14164
diff changeset
124 query 2; still undecided: 29, sample size is: 29
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
125 2 total queries
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
126 common heads: 2dc09a01254d
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
127
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
128 % -- b -> a tree
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
129 comparing with a
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
130 searching for changes
18254
2dfe519d435d debugdiscovery: report heads in sorted order
Mads Kiilerich <mads at kiilerich.com>
parents: 16913
diff changeset
131 unpruned common: 2dc09a01254d 66f7d451a68b
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
132 common heads: 2dc09a01254d
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
133
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
134 % -- b -> a set
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
135 comparing with a
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
136 query 1; heads
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
137 searching for changes
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
138 taking initial sample
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
139 searching: 2 queries
14624
f03c82d1f50a setdiscovery: batch heads and known(ownheads)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14164
diff changeset
140 query 2; still undecided: 29, sample size is: 29
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
141 2 total queries
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
142 common heads: 2dc09a01254d
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
143
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
144
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
145 Both many new:
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
146
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
147 $ testdesc '-ra' '-rb' '
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
148 > +2:f +30 :b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
149 > <f +30 :a'
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
150
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
151 % -- a -> b tree
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
152 comparing with b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
153 searching for changes
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
154 unpruned common: 66f7d451a68b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
155 common heads: 66f7d451a68b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
156
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
157 % -- a -> b set
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
158 comparing with b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
159 query 1; heads
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
160 searching for changes
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
161 taking quick initial sample
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
162 searching: 2 queries
14624
f03c82d1f50a setdiscovery: batch heads and known(ownheads)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14164
diff changeset
163 query 2; still undecided: 31, sample size is: 31
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
164 2 total queries
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
165 common heads: 66f7d451a68b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
166
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
167 % -- b -> a tree
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
168 comparing with a
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
169 searching for changes
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
170 unpruned common: 66f7d451a68b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
171 common heads: 66f7d451a68b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
172
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
173 % -- b -> a set
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
174 comparing with a
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
175 query 1; heads
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
176 searching for changes
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
177 taking quick initial sample
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
178 searching: 2 queries
14624
f03c82d1f50a setdiscovery: batch heads and known(ownheads)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14164
diff changeset
179 query 2; still undecided: 31, sample size is: 31
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
180 2 total queries
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
181 common heads: 66f7d451a68b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
182
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
183
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
184 Both many new skewed:
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
185
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
186 $ testdesc '-ra' '-rb' '
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
187 > +2:f +30 :b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
188 > <f +50 :a'
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
189
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
190 % -- a -> b tree
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
191 comparing with b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
192 searching for changes
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
193 unpruned common: 66f7d451a68b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
194 common heads: 66f7d451a68b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
195
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
196 % -- a -> b set
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
197 comparing with b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
198 query 1; heads
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
199 searching for changes
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
200 taking quick initial sample
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
201 searching: 2 queries
14624
f03c82d1f50a setdiscovery: batch heads and known(ownheads)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14164
diff changeset
202 query 2; still undecided: 51, sample size is: 51
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
203 2 total queries
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
204 common heads: 66f7d451a68b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
205
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
206 % -- b -> a tree
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
207 comparing with a
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
208 searching for changes
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
209 unpruned common: 66f7d451a68b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
210 common heads: 66f7d451a68b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
211
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
212 % -- b -> a set
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
213 comparing with a
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
214 query 1; heads
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
215 searching for changes
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
216 taking quick initial sample
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
217 searching: 2 queries
14624
f03c82d1f50a setdiscovery: batch heads and known(ownheads)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14164
diff changeset
218 query 2; still undecided: 31, sample size is: 31
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
219 2 total queries
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
220 common heads: 66f7d451a68b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
221
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
222
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
223 Both many new on top of long history:
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
224
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
225 $ testdesc '-ra' '-rb' '
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
226 > +1000:f +30 :b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
227 > <f +50 :a'
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
228
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
229 % -- a -> b tree
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
230 comparing with b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
231 searching for changes
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
232 unpruned common: 7ead0cba2838
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
233 common heads: 7ead0cba2838
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
234
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
235 % -- a -> b set
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
236 comparing with b
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
237 query 1; heads
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
238 searching for changes
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
239 taking quick initial sample
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
240 searching: 2 queries
14624
f03c82d1f50a setdiscovery: batch heads and known(ownheads)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14164
diff changeset
241 query 2; still undecided: 1049, sample size is: 11
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
242 sampling from both directions
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
243 searching: 3 queries
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
244 query 3; still undecided: 31, sample size is: 31
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
245 3 total queries
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
246 common heads: 7ead0cba2838
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
247
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
248 % -- b -> a tree
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
249 comparing with a
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
250 searching for changes
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
251 unpruned common: 7ead0cba2838
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
252 common heads: 7ead0cba2838
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
253
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
254 % -- b -> a set
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
255 comparing with a
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
256 query 1; heads
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
257 searching for changes
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
258 taking quick initial sample
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
259 searching: 2 queries
14624
f03c82d1f50a setdiscovery: batch heads and known(ownheads)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14164
diff changeset
260 query 2; still undecided: 1029, sample size is: 11
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
261 sampling from both directions
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
262 searching: 3 queries
15052
06c3667c259c dagutil: fix off-by-one in inverserevlogdag buildup
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14736
diff changeset
263 query 3; still undecided: 15, sample size is: 15
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
264 3 total queries
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
265 common heads: 7ead0cba2838
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
266
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
267
15063
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
268 One with >200 heads, which used to use up all of the sample:
14164
cb98fed52495 discovery: add new set-based discovery
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff changeset
269
15063
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
270 $ hg init manyheads
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
271 $ cd manyheads
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
272 $ echo "+300:r @a" >dagdesc
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
273 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
274 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
275 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
276 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
277 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
278 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
279 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
280 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
281 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
282 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
283 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
284 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
285 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
286 $ echo "@b *r+3" >>dagdesc # one more head
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
287 $ hg debugbuilddag <dagdesc
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
288 reading DAG from stdin
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
289
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
290 $ hg heads -t --template . | wc -c
15090
3bccc15b201f test-setdiscovery: allow for leading space in output of wc
Lee Cantey <lcantey@gmail.com>
parents: 15063
diff changeset
291 \s*261 (re)
15063
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
292
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
293 $ hg clone -b a . a
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
294 adding changesets
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
295 adding manifests
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
296 adding file changes
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
297 added 1340 changesets with 0 changes to 0 files (+259 heads)
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
298 updating to branch a
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
299 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
300 $ hg clone -b b . b
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
301 adding changesets
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
302 adding manifests
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
303 adding file changes
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
304 added 304 changesets with 0 changes to 0 files
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
305 updating to branch b
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
306 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
307
25125
bd625cd4e5e7 progress: get the extremely verbose output out of default debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24361
diff changeset
308 $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true
15063
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
309 comparing with b
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
310 query 1; heads
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
311 searching for changes
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
312 taking quick initial sample
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
313 searching: 2 queries
23130
ced632394371 setdiscovery: limit the size of all sample (issue4411)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23084
diff changeset
314 query 2; still undecided: 1240, sample size is: 100
15063
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
315 sampling from both directions
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
316 searching: 3 queries
23130
ced632394371 setdiscovery: limit the size of all sample (issue4411)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23084
diff changeset
317 query 3; still undecided: 1140, sample size is: 200
15063
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
318 sampling from both directions
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
319 searching: 4 queries
23813
932f814bf016 setdiscovery: always add exponential sample to the heads
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23812
diff changeset
320 query 4; still undecided: 592, sample size is: 200
15063
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
321 sampling from both directions
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
322 searching: 5 queries
23813
932f814bf016 setdiscovery: always add exponential sample to the heads
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23812
diff changeset
323 query 5; still undecided: 292, sample size is: 200
23130
ced632394371 setdiscovery: limit the size of all sample (issue4411)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23084
diff changeset
324 sampling from both directions
ced632394371 setdiscovery: limit the size of all sample (issue4411)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23084
diff changeset
325 searching: 6 queries
23813
932f814bf016 setdiscovery: always add exponential sample to the heads
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23812
diff changeset
326 query 6; still undecided: 51, sample size is: 51
932f814bf016 setdiscovery: always add exponential sample to the heads
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23812
diff changeset
327 6 total queries
15063
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
328 common heads: 3ee37d65064a
c20688b7c061 setdiscovery: fix hang when #heads>200 (issue2971)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 15052
diff changeset
329
22181
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
330 Test actual protocol when pulling one new head in addition to common heads
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
331
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
332 $ hg clone -U b c
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
333 $ hg -R c id -ir tip
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
334 513314ca8b3a
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
335 $ hg -R c up -qr default
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
336 $ touch c/f
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
337 $ hg -R c ci -Aqm "extra head"
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
338 $ hg -R c id -i
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
339 e64a39e7da8b
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
340
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
341 $ hg serve -R c -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
342 $ cat hg.pid >> $DAEMON_PIDS
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
343
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
344 $ hg -R b incoming http://localhost:$HGPORT/ -T '{node|short}\n'
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
345 comparing with http://localhost:$HGPORT/
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
346 searching for changes
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
347 e64a39e7da8b
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
348
25474
8c14f87bd0ae tests: drop DAEMON_PIDS from killdaemons calls
Matt Mackall <mpm@selenic.com>
parents: 25472
diff changeset
349 $ killdaemons.py
22181
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
350 $ cut -d' ' -f6- access.log | grep -v cmd=known # cmd=known uses random sampling
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
351 "GET /?cmd=capabilities HTTP/1.1" 200 -
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
352 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D513314ca8b3ae4dac8eec56966265b00fcf866db
26544
1e8e0b01faba incoming: request a bundle2 when possible (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25474
diff changeset
353 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=513314ca8b3ae4dac8eec56966265b00fcf866db&heads=e64a39e7da8b0d54bc63e81169aff001c13b3477
23633
96c3cbec006f incoming: handle phases the same as pull
Eric Sumner <ericsumner@fb.com>
parents: 23233
diff changeset
354 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
22181
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
355 $ cat errors.log
851db07bb2de tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com>
parents: 18254
diff changeset
356
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15092
diff changeset
357 $ cd ..
23233
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
358
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
359
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
360 Issue 4438 - test coverage for 3ef893520a85 issues.
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
361
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
362 $ mkdir issue4438
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
363 $ cd issue4438
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
364 #if false
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
365 generate new bundles:
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
366 $ hg init r1
24361
8de8cd34f2e3 tests: replace uses of 'seq' with portable 'seq.py'
Matt Harbison <matt_harbison@yahoo.com>
parents: 23813
diff changeset
367 $ for i in `python $TESTDIR/seq.py 101`; do hg -R r1 up -qr null && hg -R r1 branch -q b$i && hg -R r1 ci -qmb$i; done
23233
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
368 $ hg clone -q r1 r2
24361
8de8cd34f2e3 tests: replace uses of 'seq' with portable 'seq.py'
Matt Harbison <matt_harbison@yahoo.com>
parents: 23813
diff changeset
369 $ for i in `python $TESTDIR/seq.py 10`; do hg -R r1 up -qr null && hg -R r1 branch -q c$i && hg -R r1 ci -qmc$i; done
23233
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
370 $ hg -R r2 branch -q r2change && hg -R r2 ci -qmr2change
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
371 $ hg -R r1 bundle -qa $TESTDIR/bundles/issue4438-r1.hg
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
372 $ hg -R r2 bundle -qa $TESTDIR/bundles/issue4438-r2.hg
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
373 #else
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
374 use existing bundles:
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
375 $ hg clone -q $TESTDIR/bundles/issue4438-r1.hg r1
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
376 $ hg clone -q $TESTDIR/bundles/issue4438-r2.hg r2
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
377 #endif
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
378
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
379 Set iteration order could cause wrong and unstable results - fixed in 73cfaa348650:
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
380
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
381 $ hg -R r1 outgoing r2 -T'{rev} '
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
382 comparing with r2
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
383 searching for changes
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
384 101 102 103 104 105 106 107 108 109 110 (no-eol)
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
385
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
386 The case where all the 'initialsamplesize' samples already were common would
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
387 give 'all remote heads known locally' without checking the remaining heads -
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
388 fixed in 86c35b7ae300:
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
389
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
390 $ cat >> $TESTTMP/unrandomsample.py << EOF
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
391 > import random
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
392 > def sample(population, k):
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
393 > return sorted(population)[:k]
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
394 > random.sample = sample
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
395 > EOF
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
396
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
397 $ cat >> r1/.hg/hgrc << EOF
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
398 > [extensions]
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
399 > unrandomsample = $TESTTMP/unrandomsample.py
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
400 > EOF
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
401
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
402 $ hg -R r1 outgoing r2 -T'{rev} '
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
403 comparing with r2
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
404 searching for changes
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
405 101 102 103 104 105 106 107 108 109 110 (no-eol)
c1f370dab456 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com>
parents: 23130
diff changeset
406 $ cd ..