[Commented On] D10627: revlogv2: also test transactionality of revlog v2
baymax (Baymax, Your Personal Patch-care Companion)
phabricator at mercurial-scm.org
Tue May 11 18:20:11 UTC 2021
baymax added a comment.
baymax updated this revision to Diff 27873.
✅ refresh by Heptapod after a successful CI run (🐙 💚)
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D10627?vs=27470&id=27873
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10627/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10627
AFFECTED FILES
tests/test-transaction-safety.t
CHANGE DETAILS
diff --git a/tests/test-transaction-safety.t b/tests/test-transaction-safety.t
--- a/tests/test-transaction-safety.t
+++ b/tests/test-transaction-safety.t
@@ -1,6 +1,26 @@
Test transaction safety
=======================
+#testcases revlogv1 revlogv2
+
+#if revlogv1
+
+ $ cat << EOF >> $HGRCPATH
+ > [experimental]
+ > revlogv2=no
+ > EOF
+
+#endif
+
+#if revlogv2
+
+ $ cat << EOF >> $HGRCPATH
+ > [experimental]
+ > revlogv2=enable-unstable-format-and-corrupt-my-data
+ > EOF
+
+#endif
+
This test basic case to make sure external process do not see transaction
content until it is committed.
@@ -103,84 +123,146 @@
$ make_one_commit first
pre-commit: -1
- external: -1
+ external: -1 (revlogv1 !)
+ external: 0 first (revlogv2 known-bad-output !)
internal: 0 first
post-tr: 0 first
+
+#if revlogv1
+
$ hg debugrevlog -c | grep inline
flags : inline
+#endif
+
check this is true for extra commit (inline → inline)
-----------------------------------------------------
the repository should still be inline (for relevant format)
+#if revlogv1
+
$ hg debugrevlog -c | grep inline
flags : inline
+
+#endif
+
$ make_one_commit second
pre-commit: 0 first
- external: 0 first
+ external: 0 first (revlogv1 !)
+ external: 1 second (revlogv2 known-bad-output !)
internal: 1 second
post-tr: 1 second
+
+#if revlogv1
+
$ hg debugrevlog -c | grep inline
flags : inline
+#endif
+
check this is true for a small pull (inline → inline)
-----------------------------------------------------
the repository should still be inline (for relevant format)
+#if revlogv1
+
$ hg debugrevlog -c | grep inline
flags : inline
+
+#endif
+
$ make_one_pull 3
pre-commit: 1 second
warning: repository is unrelated
- external: 1 second
+ external: 1 second (revlogv1 !)
+ external: 5 r3 (revlogv2 known-bad-output !)
internal: 5 r3
post-tr: 5 r3
+
+#if revlogv1
+
$ hg debugrevlog -c | grep inline
flags : inline
+#endif
+
Make a large pull (inline → no-inline)
---------------------------------------
the repository should no longer be inline (for relevant format)
+#if revlogv1
+
$ hg debugrevlog -c | grep inline
flags : inline
+
+#endif
+
$ make_one_pull 400
pre-commit: 5 r3
- external: 5 r3
+ external: 5 r3 (revlogv1 !)
+ external: 402 r400 (revlogv2 known-bad-output !)
internal: 402 r400
post-tr: 402 r400
+
+#if revlogv1
+
$ hg debugrevlog -c | grep inline
[1]
+#endif
+
check this is true for extra commit (no-inline → no-inline)
-----------------------------------------------------------
the repository should no longer be inline (for relevant format)
+
+#if revlogv1
+
$ hg debugrevlog -c | grep inline
[1]
+
+#endif
+
$ make_one_commit third
pre-commit: 402 r400
- external: 402 r400
+ external: 402 r400 (revlogv1 !)
+ external: 403 third (revlogv2 known-bad-output !)
internal: 403 third
post-tr: 403 third
+
+#if revlogv1
+
$ hg debugrevlog -c | grep inline
[1]
+#endif
+
Make a pull (not-inline → no-inline)
-------------------------------------
the repository should no longer be inline (for relevant format)
+#if revlogv1
+
$ hg debugrevlog -c | grep inline
[1]
+
+#endif
+
$ make_one_pull tip
pre-commit: 403 third
- external: 403 third
+ external: 403 third (revlogv1 !)
+ external: 503 r500 (revlogv2 known-bad-output !)
internal: 503 r500
post-tr: 503 r500
+
+#if revlogv1
+
$ hg debugrevlog -c | grep inline
[1]
+
+#endif
To: marmoute, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210511/65ccea0f/attachment-0002.html>
More information about the Mercurial-patches
mailing list