[Commented On] D12593: rust-dirstate-v2: show `unused_bytes` counter is not reset on total rewrite

baymax (Baymax, Your Personal Patch-care Companion) phabricator at mercurial-scm.org
Wed May 4 14:53:08 UTC 2022


baymax added a comment.
baymax updated this revision to Diff 33349.


  ✅ refresh by Heptapod after a successful CI run (🐙 💚)
  ⚠ This patch is intended for stable ⚠
  <img src="https://phab.mercurial-scm.org/file/data/qqhfsqwiqrmcalesyz5o/PHID-FILE-5remnsbppxl5yauxywbg/source.gif" />

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D12593?vs=33342&id=33349

BRANCH
  stable

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D12593/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D12593

AFFECTED FILES
  tests/test-dirstate.t

CHANGE DETAILS

diff --git a/tests/test-dirstate.t b/tests/test-dirstate.t
--- a/tests/test-dirstate.t
+++ b/tests/test-dirstate.t
@@ -166,6 +166,25 @@
    *1 (re)
   $ dirstate_uuid_has_not_changed
 
+Unused bytes counter is non-0 when appending
+  $ touch file
+  $ hg add file
+  $ dirstate_data_files | wc -l
+   *1 (re)
+  $ current_uid=$(find_dirstate_uuid)
+
+Trigger a rust/rhg run which updates the unused bytes value
+  $ hg st
+  M dir2/f
+  A file
+  $ dirstate_uuid_has_not_changed
+
+  $ hg debugstate --docket | grep unused
+  number of unused bytes: 0 (no-rust no-rhg !)
+  number of unused bytes: [1-9]\d* (re) (rhg no-rust !)
+  number of unused bytes: [1-9]\d* (re) (rust no-rhg !)
+  number of unused bytes: [1-9]\d* (re) (rust rhg !)
+
 Delete most of the dirstate to trigger a non-append
   $ hg rm dir/a dir/b dir/c dir/d
   $ dirstate_data_files | wc -l
@@ -173,5 +192,12 @@
   $ dirstate_uuid_has_not_changed also-if-python
   [1]
 
+Check that unused bytes counter is reset when creating a new docket
+
+  $ hg debugstate --docket | grep unused
+  number of unused bytes: 0 (no-rust !)
+  number of unused bytes: [1-9]\d* (re) (rust known-bad-output !)
+
+#endif
+
   $ cd ..
-#endif



To: Alphare, #hg-reviewers, marmoute, av6
Cc: av6, romimichal99, mercurial-patches, aalekseyev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220504/69bf89be/attachment-0002.html>


More information about the Mercurial-patches mailing list