Mercurial > hg-stable
comparison tests/test-hgignore.t @ 48235:b4f83c9e7905
dirstate-v2: Add support when Rust is not enabled
This wires into `dirstatemap` the parser and serializer added in previous
changesets. The memory representation is still the same, with a flat `dict`
for `DirstateItem`s and another one for copy sources. Serialization always
creates a new dirstate-v2 data file and does not support (when Rust is not
enabled) appending to an existing one, since we don’t keep track of which
tree nodes are new or modified. Instead the tree is reconstructed during
serialization.
Differential Revision: https://phab.mercurial-scm.org/D11520
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Fri, 16 Jul 2021 18:42:20 +0200 |
parents | bf8837e3d7ce |
children | 5c567aca080d |
comparison
equal
deleted
inserted
replaced
48234:7e78c72ee3ea | 48235:b4f83c9e7905 |
---|---|
1 #testcases dirstate-v1 dirstate-v2 | 1 #testcases dirstate-v1 dirstate-v2 |
2 | 2 |
3 #if dirstate-v2 | 3 #if dirstate-v2 |
4 #require rust | |
5 $ echo '[format]' >> $HGRCPATH | 4 $ echo '[format]' >> $HGRCPATH |
6 $ echo 'exp-dirstate-v2=1' >> $HGRCPATH | 5 $ echo 'exp-dirstate-v2=1' >> $HGRCPATH |
7 #endif | 6 #endif |
8 | 7 |
9 $ hg init ignorerepo | 8 $ hg init ignorerepo |
395 (ignore rule in $TESTTMP\ignorerepo\.hgignore, line 4: 'dir1/file*') | 394 (ignore rule in $TESTTMP\ignorerepo\.hgignore, line 4: 'dir1/file*') |
396 $ hg up -qC . | 395 $ hg up -qC . |
397 | 396 |
398 #endif | 397 #endif |
399 | 398 |
400 #if dirstate-v2 | 399 #if dirstate-v2 rust |
401 | 400 |
402 Check the hash of ignore patterns written in the dirstate | 401 Check the hash of ignore patterns written in the dirstate |
402 This is an optimization that is only relevant when using the Rust extensions | |
403 | 403 |
404 $ hg status > /dev/null | 404 $ hg status > /dev/null |
405 $ cat .hg/testhgignore .hg/testhgignorerel .hgignore dir2/.hgignore dir1/.hgignore dir1/.hgignoretwo | $TESTDIR/f --sha1 | 405 $ cat .hg/testhgignore .hg/testhgignorerel .hgignore dir2/.hgignore dir1/.hgignore dir1/.hgignoretwo | $TESTDIR/f --sha1 |
406 sha1=6e315b60f15fb5dfa02be00f3e2c8f923051f5ff | 406 sha1=6e315b60f15fb5dfa02be00f3e2c8f923051f5ff |
407 $ hg debugdirstateignorepatternshash | 407 $ hg debugdirstateignorepatternshash |