Mercurial > hg
comparison tests/test-hgignore.t @ 47476:f23eafb036af
dirstate-v2: Use 32-bit integers instead of 64-bit for offsets
This saves 12 bytes per node. (Nodes representing files or directories.)
These are offsets to other parts of the file. This would only be a limitation
for a `.hg/dirstate` file larger than 4 GiB, which would only happen for a
repository with dozens of millions of files and directories.
Differential Revision: https://phab.mercurial-scm.org/D10920
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Mon, 28 Jun 2021 15:41:50 +0200 |
parents | 0ef8231e413f |
children | ff97e793ed36 |
comparison
equal
deleted
inserted
replaced
47475:94e38822d395 | 47476:f23eafb036af |
---|---|
404 #endif | 404 #endif |
405 | 405 |
406 #if dirstate-v2 | 406 #if dirstate-v2 |
407 | 407 |
408 Check the hash of ignore patterns written in the dirstate at offset | 408 Check the hash of ignore patterns written in the dirstate at offset |
409 12 + 20 + 20 + 8 + 4 + 4 + 4 = 72 | 409 12 + 20 + 20 + 4 + 4 + 4 + 4 = 68 |
410 | 410 |
411 $ hg status > /dev/null | 411 $ hg status > /dev/null |
412 $ cat .hg/testhgignore .hg/testhgignorerel .hgignore dir2/.hgignore dir1/.hgignore dir1/.hgignoretwo | $TESTDIR/f --sha1 | 412 $ cat .hg/testhgignore .hg/testhgignorerel .hgignore dir2/.hgignore dir1/.hgignore dir1/.hgignoretwo | $TESTDIR/f --sha1 |
413 sha1=6e315b60f15fb5dfa02be00f3e2c8f923051f5ff | 413 sha1=6e315b60f15fb5dfa02be00f3e2c8f923051f5ff |
414 >>> import binascii; print(binascii.hexlify(open(".hg/dirstate", "rb").read()[72:][:20]).decode()) | 414 >>> import binascii; print(binascii.hexlify(open(".hg/dirstate", "rb").read()[68:][:20]).decode()) |
415 6e315b60f15fb5dfa02be00f3e2c8f923051f5ff | 415 6e315b60f15fb5dfa02be00f3e2c8f923051f5ff |
416 | 416 |
417 $ echo rel > .hg/testhgignorerel | 417 $ echo rel > .hg/testhgignorerel |
418 $ hg status > /dev/null | 418 $ hg status > /dev/null |
419 $ cat .hg/testhgignore .hg/testhgignorerel .hgignore dir2/.hgignore dir1/.hgignore dir1/.hgignoretwo | $TESTDIR/f --sha1 | 419 $ cat .hg/testhgignore .hg/testhgignorerel .hgignore dir2/.hgignore dir1/.hgignore dir1/.hgignoretwo | $TESTDIR/f --sha1 |
420 sha1=dea19cc7119213f24b6b582a4bae7b0cb063e34e | 420 sha1=dea19cc7119213f24b6b582a4bae7b0cb063e34e |
421 >>> import binascii; print(binascii.hexlify(open(".hg/dirstate", "rb").read()[72:][:20]).decode()) | 421 >>> import binascii; print(binascii.hexlify(open(".hg/dirstate", "rb").read()[68:][:20]).decode()) |
422 dea19cc7119213f24b6b582a4bae7b0cb063e34e | 422 dea19cc7119213f24b6b582a4bae7b0cb063e34e |
423 | 423 |
424 #endif | 424 #endif |