diff --git a/mercurial/utils/storageutil.py b/mercurial/utils/storageutil.py --- a/mercurial/utils/storageutil.py +++ b/mercurial/utils/storageutil.py @@ -458,6 +458,10 @@ def emitrevisions( if debug_info is not None: debug_delta_source = "storage" baserev = deltaparentrev + elif deltaparentrev == nullrev: + if debug_info is not None: + debug_delta_source = "storage" + baserev = deltaparentrev else: if deltaparentrev != nullrev and debug_info is not None: debug_info['denied-base-not-available'] += 1 diff --git a/tests/test-commit-amend.t b/tests/test-commit-amend.t --- a/tests/test-commit-amend.t +++ b/tests/test-commit-amend.t @@ -123,13 +123,13 @@ No changes, just a different message: uncompressed size of bundle content: 254 (changelog) 163 (manifests) - 131 a + 133 a saved backup bundle to $TESTTMP/repo/.hg/strip-backup/47343646fa3d-c2758885-amend.hg 1 changesets found uncompressed size of bundle content: 250 (changelog) 163 (manifests) - 131 a + 133 a adding branch adding changesets adding manifests @@ -267,13 +267,13 @@ then, test editing custom commit message uncompressed size of bundle content: 249 (changelog) 163 (manifests) - 133 a + 135 a saved backup bundle to $TESTTMP/repo/.hg/strip-backup/a9a13940fc03-7c2e8674-amend.hg 1 changesets found uncompressed size of bundle content: 257 (changelog) 163 (manifests) - 133 a + 135 a adding branch adding changesets adding manifests @@ -303,13 +303,13 @@ Same, but with changes in working dir (d uncompressed size of bundle content: 257 (changelog) 163 (manifests) - 133 a + 135 a saved backup bundle to $TESTTMP/repo/.hg/strip-backup/64a124ba1b44-10374b8f-amend.hg 1 changesets found uncompressed size of bundle content: 257 (changelog) 163 (manifests) - 135 a + 137 a adding branch adding changesets adding manifests diff --git a/tests/test-infinitepush.t b/tests/test-infinitepush.t --- a/tests/test-infinitepush.t +++ b/tests/test-infinitepush.t @@ -46,8 +46,8 @@ multihead push works. remote: bc22f9a30a82 multihead1 remote: ee4802bf6864 multihead2 $ scratchnodes - bc22f9a30a821118244deacbd732e394ed0b686c ab1bc557aa090a9e4145512c734b6e8a828393a5 - ee4802bf6864326a6b3dcfff5a03abc2a0a69b8f ab1bc557aa090a9e4145512c734b6e8a828393a5 + bc22f9a30a821118244deacbd732e394ed0b686c de1b7d132ba98f0172cd974e3e69dfa80faa335c + ee4802bf6864326a6b3dcfff5a03abc2a0a69b8f de1b7d132ba98f0172cd974e3e69dfa80faa335c Create two new scratch bookmarks $ hg up 0 diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t --- a/tests/test-largefiles.t +++ b/tests/test-largefiles.t @@ -1122,7 +1122,7 @@ redo pull with --lfrev and check it pull 6 changesets found uncompressed size of bundle content: 1389 (changelog) - 1599 (manifests) + 1698 (manifests) 254 .hglf/large1 564 .hglf/large3 572 .hglf/sub/large4 diff --git a/tests/test-rebase-conflicts.t b/tests/test-rebase-conflicts.t --- a/tests/test-rebase-conflicts.t +++ b/tests/test-rebase-conflicts.t @@ -315,7 +315,7 @@ Check that the right ancestors is used w adding manifests adding file changes adding f1.txt revisions - bundle2-input-part: total payload size 1686 + bundle2-input-part: total payload size 1739 bundle2-input-part: "cache:rev-branch-cache" (advisory) supported bundle2-input-part: total payload size 74 bundle2-input-part: "phase-heads" supported diff --git a/tests/test-revlog-delta-find.t b/tests/test-revlog-delta-find.t --- a/tests/test-revlog-delta-find.t +++ b/tests/test-revlog-delta-find.t @@ -296,6 +296,21 @@ snapshot again. DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob) DBG-DELTAS: FILELOG:my-file.txt: rev=4: delta-base=4 * (glob) +Check that "forced" behavior do not challenge the delta, even if it is full. +--------------------------------------------------------------------------- + +A full bundle should be accepted as full bundle without recomputation + + $ cp -ar local-pre-pull-full local-forced-full + $ hg -R local-forced-full pull --quiet \ + > --config 'paths.default:delta-reuse-policy=forced' + DBG-DELTAS: CHANGELOG: * (glob) + DBG-DELTAS: CHANGELOG: * (glob) + DBG-DELTAS: MANIFESTLOG: * (glob) + DBG-DELTAS: MANIFESTLOG: * (glob) + DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob) + DBG-DELTAS: FILELOG:my-file.txt: rev=4: delta-base=4 is-cached=1 - search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - * (glob) + Check that "forced" behavior do not challenge the delta, even if it is bad. --------------------------------------------------------------------------- @@ -305,9 +320,11 @@ Note: If the bundling process becomes sm (as the server won't be sending "bad" deltas anymore) and might need something more subtle to test this behavior. - $ cp -ar local-pre-pull-full local-forced-full - $ hg -R local-forced-full pull --quiet \ - > --config 'paths.default:delta-reuse-policy=forced' + $ hg bundle -R peer-bad-delta-with-full --all --config devel.bundle.delta=p1 all-p1.hg + 5 changesets found + $ cp -ar local-pre-pull-full local-forced-full-p1 + $ hg -R local-forced-full-p1 pull --quiet \ + > --config 'paths.*:delta-reuse-policy=forced' all-p1.hg DBG-DELTAS: CHANGELOG: * (glob) DBG-DELTAS: CHANGELOG: * (glob) DBG-DELTAS: MANIFESTLOG: * (glob)