view tests/test-debug-rebuild-dirstate.t @ 50923:c642c03969ff

dynamic-import: use sysstr for importing extension and others This logic is used by extensions, and python hooks and merge-tools. All this logic eventually deals with native string (unicode in Python 3). This patch makes it handle `str` directly instead of relying on some pycompat low lever layer to do the conversion at the last minutes. We adjust the Python version filtering of a test as the output seems to be present with Python 3.7 too.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 31 Aug 2023 02:41:33 +0200
parents a10d823a8e3d
children dcaa2df1f688
line wrap: on
line source

#require rust

  $ cat >> $HGRCPATH << EOF
  > [format]
  > use-dirstate-v2=1
  > [storage]
  > dirstate-v2.slow-path=allow
  > EOF

  $ hg init t
  $ cd t

  $ for i in 1 2 3 4 5 6 7 8 9 10; do touch foobar$i; done
  $ hg add .
  adding foobar1
  adding foobar10
  adding foobar2
  adding foobar3
  adding foobar4
  adding foobar5
  adding foobar6
  adding foobar7
  adding foobar8
  adding foobar9
  $ hg commit -m "1"

Check that there's no space leak on debugrebuilddirstate

  $ f --size .hg/dirstate*
  .hg/dirstate: size=133
  .hg/dirstate.b870a51b: size=511
  $ hg debugrebuilddirstate
  $ f --size .hg/dirstate*
  .hg/dirstate: size=133
  .hg/dirstate.88698448: size=511
  $ hg debugrebuilddirstate
  $ f --size .hg/dirstate*
  .hg/dirstate: size=133
  .hg/dirstate.6b8ab34b: size=511