comparison tests/test-treemanifest.t @ 27251:d9bfe6289acf

revlog: don't consider nullrev when choosing delta base In the most complex case, we try using the incoming delta base, then we try both parents, and then we try the previous revlog entry. If none of these result in a good delta, we natually use the null revision as base. However, we sometimes consider the nullrev before we have exhausted our other options. Specifically, when both parents are null, we use the nullrev as delta base if it produces a good delta (according to _isgooddelta()), and we fail to try the previous revlog entry as delta base. After 20a9226bdc8a (addrevision: use general delta when the incoming base delta is bad, 2015-12-01), it can also happen for non-merge commits when the incoming delta is not good. The Firefox repo (from many months back) shrinks a tiny bit with this patch: from 1.855GB to 1.830GB (1.4%). The hg repo itself shrinks even less: by less than 0.1%. There may be repos that get larger instead. This undoes the unexplained test change in 20a9226bdc8a.
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 04 Dec 2015 17:46:56 -0800
parents 4d1a96bb831f
children 2a31433a59ba
comparison
equal deleted inserted replaced
27250:bff71fe05768 27251:d9bfe6289acf
274 Turning off treemanifest config has no effect 274 Turning off treemanifest config has no effect
275 275
276 $ hg debugindex .hg/store/meta/dir1/00manifest.i 276 $ hg debugindex .hg/store/meta/dir1/00manifest.i
277 rev offset length delta linkrev nodeid p1 p2 277 rev offset length delta linkrev nodeid p1 p2
278 0 0 125 -1 4 63c9c0557d24 000000000000 000000000000 278 0 0 125 -1 4 63c9c0557d24 000000000000 000000000000
279 1 125 131 -1 5 23d12a1f6e0e 000000000000 000000000000 279 1 125 109 0 5 23d12a1f6e0e 000000000000 000000000000
280 $ echo 2 > dir1/a 280 $ echo 2 > dir1/a
281 $ hg --config experimental.treemanifest=False ci -qm 'modify dir1/a' 281 $ hg --config experimental.treemanifest=False ci -qm 'modify dir1/a'
282 $ hg debugindex .hg/store/meta/dir1/00manifest.i 282 $ hg debugindex .hg/store/meta/dir1/00manifest.i
283 rev offset length delta linkrev nodeid p1 p2 283 rev offset length delta linkrev nodeid p1 p2
284 0 0 125 -1 4 63c9c0557d24 000000000000 000000000000 284 0 0 125 -1 4 63c9c0557d24 000000000000 000000000000
285 1 125 131 -1 5 23d12a1f6e0e 000000000000 000000000000 285 1 125 109 0 5 23d12a1f6e0e 000000000000 000000000000
286 2 256 55 1 6 3cb2d87b4250 23d12a1f6e0e 000000000000 286 2 234 55 1 6 3cb2d87b4250 23d12a1f6e0e 000000000000
287 287
288 Create deeper repo with tree manifests. 288 Create deeper repo with tree manifests.
289 289
290 $ cd .. 290 $ cd ..
291 $ hg --config experimental.treemanifest=True init deeprepo 291 $ hg --config experimental.treemanifest=True init deeprepo