diff mercurial/pure/parsers.py @ 48251:dfc5a505ddc5

dirstate-v2: adds two flag to track the presence of some unrecorded files Right now, we don't record ignored or unknown files in the dirstate. However the structure would allow it. So we introduce two flags that can be used to clarify whether all unknown/ignored children are recorded or not. This will allow for more information to be stored in the future if this end up being relevant. Differential Revision: https://phab.mercurial-scm.org/D11682
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 15 Oct 2021 16:33:19 +0200
parents 1730b2fceaa1
children 602c8e8411f5
line wrap: on
line diff
--- a/mercurial/pure/parsers.py	Fri Oct 15 16:12:00 2021 +0200
+++ b/mercurial/pure/parsers.py	Fri Oct 15 16:33:19 2021 +0200
@@ -54,6 +54,8 @@
 DIRSTATE_V2_MODE_EXEC_PERM = 1 << 6
 DIRSTATE_V2_MODE_IS_SYMLINK = 1 << 7
 DIRSTATE_V2_EXPECTED_STATE_IS_MODIFIED = 1 << 8
+DIRSTATE_V2_ALL_UNKNOWN_RECORDED = 1 << 9
+DIRSTATE_V2_ALL_IGNORED_RECORDED = 1 << 10
 
 
 @attr.s(slots=True, init=False)
@@ -340,6 +342,9 @@
                 flags |= DIRSTATE_V2_MODE_IS_SYMLINK
         if self._mtime is not None:
             flags |= DIRSTATE_V2_HAS_FILE_MTIME
+        # Note: we do not need to do anything regarding
+        # DIRSTATE_V2_ALL_UNKNOWN_RECORDED and DIRSTATE_V2_ALL_IGNORED_RECORDED
+        # since we never set _DIRSTATE_V2_HAS_DIRCTORY_MTIME
         return (flags, self._size or 0, self._mtime or 0)
 
     def v1_state(self):