Show More
@@ -53,6 +53,7 b' from .node import (' | |||||
53 | from . import ( |
|
53 | from . import ( | |
54 | dagutil, |
|
54 | dagutil, | |
55 | error, |
|
55 | error, | |
|
56 | util, | |||
56 | ) |
|
57 | ) | |
57 |
|
58 | |||
58 | def _updatesample(dag, nodes, sample, quicksamplesize=0): |
|
59 | def _updatesample(dag, nodes, sample, quicksamplesize=0): | |
@@ -136,6 +137,8 b' def findcommonheads(ui, local, remote,' | |||||
136 | '''Return a tuple (common, anyincoming, remoteheads) used to identify |
|
137 | '''Return a tuple (common, anyincoming, remoteheads) used to identify | |
137 | missing nodes from or in remote. |
|
138 | missing nodes from or in remote. | |
138 | ''' |
|
139 | ''' | |
|
140 | start = util.timer() | |||
|
141 | ||||
139 | roundtrips = 0 |
|
142 | roundtrips = 0 | |
140 | cl = local.changelog |
|
143 | cl = local.changelog | |
141 | dag = dagutil.revlogdag(cl) |
|
144 | dag = dagutil.revlogdag(cl) | |
@@ -235,8 +238,9 b' def findcommonheads(ui, local, remote,' | |||||
235 | # common.bases can include nullrev, but our contract requires us to not |
|
238 | # common.bases can include nullrev, but our contract requires us to not | |
236 | # return any heads in that case, so discard that |
|
239 | # return any heads in that case, so discard that | |
237 | result.discard(nullrev) |
|
240 | result.discard(nullrev) | |
|
241 | elapsed = util.timer() - start | |||
238 | ui.progress(_('searching'), None) |
|
242 | ui.progress(_('searching'), None) | |
239 | ui.debug("%d total queries\n" % roundtrips) |
|
243 | ui.debug("%d total queries in %.4fs\n" % (roundtrips, elapsed)) | |
240 |
|
244 | |||
241 | if not result and srvheadhashes != [nullid]: |
|
245 | if not result and srvheadhashes != [nullid]: | |
242 | if abortwhenunrelated: |
|
246 | if abortwhenunrelated: |
@@ -143,7 +143,7 b' client only pulls down 1 changeset' | |||||
143 | searching for changes |
|
143 | searching for changes | |
144 | taking quick initial sample |
|
144 | taking quick initial sample | |
145 | query 2; still undecided: 2, sample size is: 2 |
|
145 | query 2; still undecided: 2, sample size is: 2 | |
146 | 2 total queries |
|
146 | 2 total queries in *.????s (glob) | |
147 | 1 changesets found |
|
147 | 1 changesets found | |
148 | list of changesets: |
|
148 | list of changesets: | |
149 | bec0734cd68e84477ba7fc1d13e6cff53ab70129 |
|
149 | bec0734cd68e84477ba7fc1d13e6cff53ab70129 |
@@ -41,7 +41,7 b' Specifying a revset that evaluates to nu' | |||||
41 | searching for changes |
|
41 | searching for changes | |
42 | taking quick initial sample |
|
42 | taking quick initial sample | |
43 | query 2; still undecided: 1, sample size is: 1 |
|
43 | query 2; still undecided: 1, sample size is: 1 | |
44 | 2 total queries |
|
44 | 2 total queries in *.????s (glob) | |
45 | listing keys for "phases" |
|
45 | listing keys for "phases" | |
46 | checking for updated bookmarks |
|
46 | checking for updated bookmarks | |
47 | listing keys for "bookmarks" |
|
47 | listing keys for "bookmarks" |
@@ -83,7 +83,7 b' Many new:' | |||||
83 | taking initial sample |
|
83 | taking initial sample | |
84 | searching: 2 queries |
|
84 | searching: 2 queries | |
85 | query 2; still undecided: 29, sample size is: 29 |
|
85 | query 2; still undecided: 29, sample size is: 29 | |
86 | 2 total queries |
|
86 | 2 total queries in *.????s (glob) | |
87 | common heads: bebd167eb94d |
|
87 | common heads: bebd167eb94d | |
88 |
|
88 | |||
89 | % -- b -> a tree |
|
89 | % -- b -> a tree | |
@@ -99,10 +99,9 b' Many new:' | |||||
99 | taking initial sample |
|
99 | taking initial sample | |
100 | searching: 2 queries |
|
100 | searching: 2 queries | |
101 | query 2; still undecided: 2, sample size is: 2 |
|
101 | query 2; still undecided: 2, sample size is: 2 | |
102 | 2 total queries |
|
102 | 2 total queries in *.????s (glob) | |
103 | common heads: bebd167eb94d |
|
103 | common heads: bebd167eb94d | |
104 |
|
104 | |||
105 |
|
||||
106 | Both sides many new with stub: |
|
105 | Both sides many new with stub: | |
107 |
|
106 | |||
108 | $ testdesc '-ra1 -ra2' '-rb' ' |
|
107 | $ testdesc '-ra1 -ra2' '-rb' ' | |
@@ -122,7 +121,7 b' Both sides many new with stub:' | |||||
122 | taking initial sample |
|
121 | taking initial sample | |
123 | searching: 2 queries |
|
122 | searching: 2 queries | |
124 | query 2; still undecided: 29, sample size is: 29 |
|
123 | query 2; still undecided: 29, sample size is: 29 | |
125 | 2 total queries |
|
124 | 2 total queries in *.????s (glob) | |
126 | common heads: 2dc09a01254d |
|
125 | common heads: 2dc09a01254d | |
127 |
|
126 | |||
128 | % -- b -> a tree |
|
127 | % -- b -> a tree | |
@@ -138,7 +137,7 b' Both sides many new with stub:' | |||||
138 | taking initial sample |
|
137 | taking initial sample | |
139 | searching: 2 queries |
|
138 | searching: 2 queries | |
140 | query 2; still undecided: 29, sample size is: 29 |
|
139 | query 2; still undecided: 29, sample size is: 29 | |
141 | 2 total queries |
|
140 | 2 total queries in *.????s (glob) | |
142 | common heads: 2dc09a01254d |
|
141 | common heads: 2dc09a01254d | |
143 |
|
142 | |||
144 |
|
143 | |||
@@ -161,7 +160,7 b' Both many new:' | |||||
161 | taking quick initial sample |
|
160 | taking quick initial sample | |
162 | searching: 2 queries |
|
161 | searching: 2 queries | |
163 | query 2; still undecided: 31, sample size is: 31 |
|
162 | query 2; still undecided: 31, sample size is: 31 | |
164 | 2 total queries |
|
163 | 2 total queries in *.????s (glob) | |
165 | common heads: 66f7d451a68b |
|
164 | common heads: 66f7d451a68b | |
166 |
|
165 | |||
167 | % -- b -> a tree |
|
166 | % -- b -> a tree | |
@@ -177,7 +176,7 b' Both many new:' | |||||
177 | taking quick initial sample |
|
176 | taking quick initial sample | |
178 | searching: 2 queries |
|
177 | searching: 2 queries | |
179 | query 2; still undecided: 31, sample size is: 31 |
|
178 | query 2; still undecided: 31, sample size is: 31 | |
180 | 2 total queries |
|
179 | 2 total queries in *.????s (glob) | |
181 | common heads: 66f7d451a68b |
|
180 | common heads: 66f7d451a68b | |
182 |
|
181 | |||
183 |
|
182 | |||
@@ -200,7 +199,7 b' Both many new skewed:' | |||||
200 | taking quick initial sample |
|
199 | taking quick initial sample | |
201 | searching: 2 queries |
|
200 | searching: 2 queries | |
202 | query 2; still undecided: 51, sample size is: 51 |
|
201 | query 2; still undecided: 51, sample size is: 51 | |
203 | 2 total queries |
|
202 | 2 total queries in *.????s (glob) | |
204 | common heads: 66f7d451a68b |
|
203 | common heads: 66f7d451a68b | |
205 |
|
204 | |||
206 | % -- b -> a tree |
|
205 | % -- b -> a tree | |
@@ -216,7 +215,7 b' Both many new skewed:' | |||||
216 | taking quick initial sample |
|
215 | taking quick initial sample | |
217 | searching: 2 queries |
|
216 | searching: 2 queries | |
218 | query 2; still undecided: 31, sample size is: 31 |
|
217 | query 2; still undecided: 31, sample size is: 31 | |
219 | 2 total queries |
|
218 | 2 total queries in *.????s (glob) | |
220 | common heads: 66f7d451a68b |
|
219 | common heads: 66f7d451a68b | |
221 |
|
220 | |||
222 |
|
221 | |||
@@ -242,7 +241,7 b' Both many new on top of long history:' | |||||
242 | sampling from both directions |
|
241 | sampling from both directions | |
243 | searching: 3 queries |
|
242 | searching: 3 queries | |
244 | query 3; still undecided: 31, sample size is: 31 |
|
243 | query 3; still undecided: 31, sample size is: 31 | |
245 | 3 total queries |
|
244 | 3 total queries in *.????s (glob) | |
246 | common heads: 7ead0cba2838 |
|
245 | common heads: 7ead0cba2838 | |
247 |
|
246 | |||
248 | % -- b -> a tree |
|
247 | % -- b -> a tree | |
@@ -261,7 +260,7 b' Both many new on top of long history:' | |||||
261 | sampling from both directions |
|
260 | sampling from both directions | |
262 | searching: 3 queries |
|
261 | searching: 3 queries | |
263 | query 3; still undecided: 15, sample size is: 15 |
|
262 | query 3; still undecided: 15, sample size is: 15 | |
264 | 3 total queries |
|
263 | 3 total queries in *.????s (glob) | |
265 | common heads: 7ead0cba2838 |
|
264 | common heads: 7ead0cba2838 | |
266 |
|
265 | |||
267 |
|
266 | |||
@@ -324,7 +323,7 b' One with >200 heads, which used to use u' | |||||
324 | sampling from both directions |
|
323 | sampling from both directions | |
325 | searching: 6 queries |
|
324 | searching: 6 queries | |
326 | query 6; still undecided: \d+, sample size is: \d+ (re) |
|
325 | query 6; still undecided: \d+, sample size is: \d+ (re) | |
327 | 6 total queries |
|
326 | 6 total queries in *.????s (glob) | |
328 | common heads: 3ee37d65064a |
|
327 | common heads: 3ee37d65064a | |
329 |
|
328 | |||
330 | Test actual protocol when pulling one new head in addition to common heads |
|
329 | Test actual protocol when pulling one new head in addition to common heads |
General Comments 0
You need to be logged in to leave comments.
Login now