changeset 50647:7c5edf6fbf01 stable

tests: check `pulled-delta-reuse-policy=forced` without general delta If general delta is not available, the amount of delta we can reuse at all will be more limited. We check that application still work and does not corrupt the repository.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 08 Jun 2023 01:07:00 +0200
parents bf7404f2e22d
children 5d210ff4b657
files tests/test-revlog-delta-find.t
diffstat 1 files changed, 29 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-revlog-delta-find.t	Tue Apr 25 15:28:40 2023 +0200
+++ b/tests/test-revlog-delta-find.t	Thu Jun 08 01:07:00 2023 +0200
@@ -331,3 +331,32 @@
   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=3 * (glob)
+
+Check that running "forced" on a non-general delta repository does not corrupt it
+---------------------------------------------------------------------------------
+
+Even if requested to be used, some of the delta in the revlog cannot be stored on a non-general delta repository. We check that the bundle application was correct.
+
+  $ hg init \
+  >    --config format.usegeneraldelta=no \
+  >    --config format.sparse-revlog=no \
+  >    local-forced-full-p1-no-gd
+  $ hg debugformat -R local-forced-full-p1-no-gd | grep generaldelta
+  generaldelta:        no
+  $ hg -R local-forced-full-p1-no-gd pull --quiet local-pre-pull-full \
+  >    --config debug.revlog.debug-delta=no
+  $ hg -R local-forced-full-p1-no-gd pull --quiet \
+  > --config 'paths.*:pulled-delta-reuse-policy=forced' all-p1.hg
+  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=0 * - search-rounds=1 try-count=1 * (glob)
+  DBG-DELTAS: FILELOG:my-file.txt: rev=4: delta-base=4 * - search-rounds=1 try-count=1 * (glob)
+  $ hg -R local-forced-full-p1-no-gd verify
+  checking changesets
+  checking manifests
+  crosschecking files in changesets and manifests
+  checking files
+  checking dirstate
+  checked 5 changesets with 5 changes to 1 files