[Request] [++ ] D11880: rhg: demonstrate that rhg breaks on non-generaldelta revlogs
aalekseyev (Arseniy Alekseyev)
phabricator at mercurial-scm.org
Tue Dec 7 18:58:09 UTC 2021
aalekseyev created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REPOSITORY
rHG Mercurial
BRANCH
stable
REVISION DETAIL
https://phab.mercurial-scm.org/D11880
AFFECTED FILES
tests/test-rhg-no-generaldelta.t
CHANGE DETAILS
diff --git a/tests/test-rhg-no-generaldelta.t b/tests/test-rhg-no-generaldelta.t
new file mode 100644
--- /dev/null
+++ b/tests/test-rhg-no-generaldelta.t
@@ -0,0 +1,30 @@
+
+ $ NO_FALLBACK="env RHG_ON_UNSUPPORTED=abort"
+
+ $ cat << EOF >> $HGRCPATH
+ > [format]
+ > sparse-revlog = no
+ > EOF
+
+ $ hg init repo --config format.generaldelta=no --config format.usegeneraldelta=no
+ $ cd repo
+ $ seq 50 > f
+ $ hg commit -q -Am initial
+ $ echo x >> f
+ $ hg commit -q -Am x
+ $ hg update .^
+ 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ $ (seq 50; echo x) | (read; cat) > f
+ $ hg commit -q -Am y
+ $ hg debugdeltachain f
+ rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
+ 0 1 1 -1 base 79 141 79 0.56028 79 0 0.00000
+ 1 1 2 0 prev 14 143 93 0.65035 93 0 0.00000
+ 2 1 3 1 prev 12 141 105 0.74468 105 0 0.00000
+
+rhg breaks on non-generaldelta revlogs:
+
+ $ $NO_FALLBACK hg cat f -r . | f --sha256 --size
+ abort: corrupted revlog (rhg !)
+ size=0, sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 (rhg !)
+ size=141, sha256=1a7fe778e33d64d5e14a9a126b77038b328356e67bacf308797bc0e39bf204f3 (no-rhg !)
To: aalekseyev, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20211207/3f4f800f/attachment.html>
More information about the Mercurial-patches
mailing list