Show More
@@ -678,8 +678,15 b' def debugdeltachain(ui, repo, file_=None' | |||||
678 | except IndexError: |
|
678 | except IndexError: | |
679 | prevrev = -1 |
|
679 | prevrev = -1 | |
680 |
|
680 | |||
681 | chainratio = float(chainsize) / float(uncomp) |
|
681 | if uncomp != 0: | |
682 | extraratio = float(extradist) / float(chainsize) |
|
682 | chainratio = float(chainsize) / float(uncomp) | |
|
683 | else: | |||
|
684 | chainratio = chainsize | |||
|
685 | ||||
|
686 | if chainsize != 0: | |||
|
687 | extraratio = float(extradist) / float(chainsize) | |||
|
688 | else: | |||
|
689 | extraratio = extradist | |||
683 |
|
690 | |||
684 | fm.startitem() |
|
691 | fm.startitem() | |
685 | fm.write('rev chainid chainlen prevrev deltatype compsize ' |
|
692 | fm.write('rev chainid chainlen prevrev deltatype compsize ' |
@@ -172,6 +172,44 b' test maxdeltachainspan' | |||||
172 | $ hg init source-repo |
|
172 | $ hg init source-repo | |
173 | $ cd source-repo |
|
173 | $ cd source-repo | |
174 | $ hg debugbuilddag --new-file '.+5:brancha$.+11:branchb$.+30:branchc<brancha+2<branchb+2' |
|
174 | $ hg debugbuilddag --new-file '.+5:brancha$.+11:branchb$.+30:branchc<brancha+2<branchb+2' | |
|
175 | # add an empty revision somewhere | |||
|
176 | $ hg up tip | |||
|
177 | 14 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
178 | $ hg rm . | |||
|
179 | removing nf10 | |||
|
180 | removing nf11 | |||
|
181 | removing nf12 | |||
|
182 | removing nf13 | |||
|
183 | removing nf14 | |||
|
184 | removing nf15 | |||
|
185 | removing nf16 | |||
|
186 | removing nf17 | |||
|
187 | removing nf51 | |||
|
188 | removing nf52 | |||
|
189 | removing nf6 | |||
|
190 | removing nf7 | |||
|
191 | removing nf8 | |||
|
192 | removing nf9 | |||
|
193 | $ hg commit -m 'empty all' | |||
|
194 | $ hg revert --all --rev 'p1(.)' | |||
|
195 | adding nf10 | |||
|
196 | adding nf11 | |||
|
197 | adding nf12 | |||
|
198 | adding nf13 | |||
|
199 | adding nf14 | |||
|
200 | adding nf15 | |||
|
201 | adding nf16 | |||
|
202 | adding nf17 | |||
|
203 | adding nf51 | |||
|
204 | adding nf52 | |||
|
205 | adding nf6 | |||
|
206 | adding nf7 | |||
|
207 | adding nf8 | |||
|
208 | adding nf9 | |||
|
209 | $ hg commit -m 'restore all' | |||
|
210 | $ hg up null | |||
|
211 | 0 files updated, 0 files merged, 14 files removed, 0 files unresolved | |||
|
212 | $ | |||
175 |
$ |
|
213 | $ cd .. | |
176 |
$ |
|
214 | $ hg -R source-repo debugdeltachain -m | |
177 | rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio |
|
215 | rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio | |
@@ -228,13 +266,15 b' test maxdeltachainspan' | |||||
228 | 50 4 2 49 p1 58 362 255 0.70442 255 0 0.00000 |
|
266 | 50 4 2 49 p1 58 362 255 0.70442 255 0 0.00000 | |
229 | 51 4 3 50 prev 356 594 611 1.02862 611 0 0.00000 |
|
267 | 51 4 3 50 prev 356 594 611 1.02862 611 0 0.00000 | |
230 | 52 4 4 51 p1 58 640 669 1.04531 669 0 0.00000 |
|
268 | 52 4 4 51 p1 58 640 669 1.04531 669 0 0.00000 | |
|
269 | 53 5 1 -1 base 0 0 0 0.00000 0 0 0.00000 | |||
|
270 | 54 5 2 53 p1 376 640 376 0.58750 376 0 0.00000 | |||
231 | $ hg clone --pull source-repo --config experimental.maxdeltachainspan=2800 relax-chain --config format.generaldelta=yes |
|
271 | $ hg clone --pull source-repo --config experimental.maxdeltachainspan=2800 relax-chain --config format.generaldelta=yes | |
232 | requesting all changes |
|
272 | requesting all changes | |
233 | adding changesets |
|
273 | adding changesets | |
234 | adding manifests |
|
274 | adding manifests | |
235 | adding file changes |
|
275 | adding file changes | |
236 |
added 5 |
|
276 | added 55 changesets with 53 changes to 53 files (+2 heads) | |
237 |
new changesets 61246295ee1e: |
|
277 | new changesets 61246295ee1e:c930ac4a5b32 | |
238 | updating to branch default |
|
278 | updating to branch default | |
239 | 14 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
279 | 14 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
240 | $ hg -R relax-chain debugdeltachain -m |
|
280 | $ hg -R relax-chain debugdeltachain -m | |
@@ -292,13 +332,15 b' test maxdeltachainspan' | |||||
292 | 50 4 2 49 p1 58 362 255 0.70442 255 0 0.00000 |
|
332 | 50 4 2 49 p1 58 362 255 0.70442 255 0 0.00000 | |
293 | 51 2 13 17 p1 58 594 739 1.24411 2781 2042 2.76319 |
|
333 | 51 2 13 17 p1 58 594 739 1.24411 2781 2042 2.76319 | |
294 | 52 5 1 -1 base 369 640 369 0.57656 369 0 0.00000 |
|
334 | 52 5 1 -1 base 369 640 369 0.57656 369 0 0.00000 | |
|
335 | 53 6 1 -1 base 0 0 0 0.00000 0 0 0.00000 | |||
|
336 | 54 6 2 53 p1 376 640 376 0.58750 376 0 0.00000 | |||
295 | $ hg clone --pull source-repo --config experimental.maxdeltachainspan=0 noconst-chain --config format.generaldelta=yes |
|
337 | $ hg clone --pull source-repo --config experimental.maxdeltachainspan=0 noconst-chain --config format.generaldelta=yes | |
296 | requesting all changes |
|
338 | requesting all changes | |
297 | adding changesets |
|
339 | adding changesets | |
298 | adding manifests |
|
340 | adding manifests | |
299 | adding file changes |
|
341 | adding file changes | |
300 |
added 5 |
|
342 | added 55 changesets with 53 changes to 53 files (+2 heads) | |
301 |
new changesets 61246295ee1e: |
|
343 | new changesets 61246295ee1e:c930ac4a5b32 | |
302 | updating to branch default |
|
344 | updating to branch default | |
303 | 14 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
345 | 14 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
304 | $ hg -R noconst-chain debugdeltachain -m |
|
346 | $ hg -R noconst-chain debugdeltachain -m | |
@@ -356,3 +398,5 b' test maxdeltachainspan' | |||||
356 | 50 1 8 49 p1 58 362 447 1.23481 2915 2468 5.52125 |
|
398 | 50 1 8 49 p1 58 362 447 1.23481 2915 2468 5.52125 | |
357 | 51 2 13 17 p1 58 594 739 1.24411 2642 1903 2.57510 |
|
399 | 51 2 13 17 p1 58 594 739 1.24411 2642 1903 2.57510 | |
358 | 52 2 14 51 p1 58 640 797 1.24531 2700 1903 2.38770 |
|
400 | 52 2 14 51 p1 58 640 797 1.24531 2700 1903 2.38770 | |
|
401 | 53 4 1 -1 base 0 0 0 0.00000 0 0 0.00000 | |||
|
402 | 54 4 2 53 p1 376 640 376 0.58750 376 0 0.00000 |
General Comments 0
You need to be logged in to leave comments.
Login now