comparison mercurial/revlogutils/flagutil.py @ 48575:e91aa800ae5b

rhg: desambiguate status without decompressing filelog if possible When status is unsure based on `stat()` and the dirstate if a file is clean or modified, we need to compare it against the filelog. This comparison can skip looking at contents if the lengths differ. This changeset optimize this further to deduce what we can about the length if the filelog without decompressing it or resolving deltas. Differential Revision: https://phab.mercurial-scm.org/D11965
author Simon Sapin <simon.sapin@octobus.net>
date Fri, 07 Jan 2022 14:40:21 +0100
parents 119790e1c67c
children 6000f5b25c9b
comparison
equal deleted inserted replaced
48574:5026a0d37526 48575:e91aa800ae5b
30 REVIDX_HASCOPIESINFO, 30 REVIDX_HASCOPIESINFO,
31 REVIDX_DEFAULT_FLAGS 31 REVIDX_DEFAULT_FLAGS
32 REVIDX_FLAGS_ORDER 32 REVIDX_FLAGS_ORDER
33 REVIDX_RAWTEXT_CHANGING_FLAGS 33 REVIDX_RAWTEXT_CHANGING_FLAGS
34 34
35 # Keep this in sync with REVIDX_KNOWN_FLAGS in rust/hg-core/src/revlog/revlog.rs
35 REVIDX_KNOWN_FLAGS = util.bitsfrom(REVIDX_FLAGS_ORDER) 36 REVIDX_KNOWN_FLAGS = util.bitsfrom(REVIDX_FLAGS_ORDER)
36 37
37 # Store flag processors (cf. 'addflagprocessor()' to register) 38 # Store flag processors (cf. 'addflagprocessor()' to register)
38 flagprocessors = { 39 flagprocessors = {
39 REVIDX_ISCENSORED: None, 40 REVIDX_ISCENSORED: None,