changeset 48266:749946b6a641

dirstate-v2: reorder flag to group related one together Since the format is not frozen yet, it seems like the right moment to do it. Differential Revision: https://phab.mercurial-scm.org/D11704
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 20 Oct 2021 00:21:41 +0200
parents 3861e3f6ad54
children c900d962e38b
files mercurial/cext/util.h mercurial/helptext/internals/dirstate-v2.txt mercurial/pure/parsers.py rust/hg-core/src/dirstate_tree/on_disk.rs
diffstat 4 files changed, 53 insertions(+), 53 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cext/util.h	Tue Oct 19 20:14:17 2021 +0200
+++ b/mercurial/cext/util.h	Wed Oct 20 00:21:41 2021 +0200
@@ -32,22 +32,22 @@
 } dirstateItemObject;
 /* clang-format on */
 
-static const int dirstate_flag_wc_tracked = 1;
+static const int dirstate_flag_wc_tracked = 1 << 0;
 static const int dirstate_flag_p1_tracked = 1 << 1;
 static const int dirstate_flag_p2_info = 1 << 2;
-static const int dirstate_flag_has_meaningful_data = 1 << 3;
-static const int dirstate_flag_has_mtime = 1 << 4;
-static const int dirstate_flag_directory = 1 << 5;
-static const int dirstate_flag_mode_exec_perm = 1 << 6;
-static const int dirstate_flag_mode_is_symlink = 1 << 7;
-static const int dirstate_flag_expected_state_is_modified = 1 << 8;
-static const int dirstate_flag_all_unknown_recorded = 1 << 9;
-static const int dirstate_flag_all_ignored_recorded = 1 << 10;
-static const int dirstate_flag_fallback_exec = 1 << 11;
-static const int dirstate_flag_has_fallback_exec = 1 << 12;
-static const int dirstate_flag_fallback_symlink = 1 << 13;
-static const int dirstate_flag_has_fallback_symlink = 1 << 14;
-static const int dirstate_flag_mtime_second_ambiguous = 1 << 15;
+static const int dirstate_flag_mode_exec_perm = 1 << 3;
+static const int dirstate_flag_mode_is_symlink = 1 << 4;
+static const int dirstate_flag_has_fallback_exec = 1 << 5;
+static const int dirstate_flag_fallback_exec = 1 << 6;
+static const int dirstate_flag_has_fallback_symlink = 1 << 7;
+static const int dirstate_flag_fallback_symlink = 1 << 8;
+static const int dirstate_flag_expected_state_is_modified = 1 << 9;
+static const int dirstate_flag_has_meaningful_data = 1 << 10;
+static const int dirstate_flag_has_mtime = 1 << 11;
+static const int dirstate_flag_mtime_second_ambiguous = 1 << 12;
+static const int dirstate_flag_directory = 1 << 13;
+static const int dirstate_flag_all_unknown_recorded = 1 << 14;
+static const int dirstate_flag_all_ignored_recorded = 1 << 15;
 
 extern PyTypeObject dirstateItemType;
 #define dirstate_tuple_check(op) (Py_TYPE(op) == &dirstateItemType)
--- a/mercurial/helptext/internals/dirstate-v2.txt	Tue Oct 19 20:14:17 2021 +0200
+++ b/mercurial/helptext/internals/dirstate-v2.txt	Wed Oct 20 00:21:41 2021 +0200
@@ -378,19 +378,19 @@
     WDIR_TRACKED = 1 << 0
     P1_TRACKED = 1 << 1
     P2_INFO = 1 << 2
-    HAS_MODE_AND_SIZE = 1 << 3
-    HAS_MTIME = 1 << 4
-    DIRECTORY = 1 << 5
-    MODE_EXEC_PERM = 1 << 6
-    MODE_IS_SYMLINK = 1 << 7
-    EXPECTED_STATE_IS_MODIFIED = 1 << 8
-    ALL_UNKNOWN_RECORDED = 1 << 9
-    ALL_IGNORED_RECORDED = 1 << 10
-    HAS_FALLBACK_EXEC = 1 << 11
-    FALLBACK_EXEC = 1 << 12
-    HAS_FALLBACK_SYMLINK = 1 << 13
-    FALLBACK_SYMLINK = 1 << 14
-    MTIME_SECOND_AMBIGUOUS = 1 << 15
+    MODE_EXEC_PERM = 1 << 3
+    MODE_IS_SYMLINK = 1 << 4
+    HAS_FALLBACK_EXEC = 1 << 5
+    FALLBACK_EXEC = 1 << 6
+    HAS_FALLBACK_SYMLINK = 1 << 7
+    FALLBACK_SYMLINK = 1 << 8
+    EXPECTED_STATE_IS_MODIFIED = 1 << 9
+    HAS_MODE_AND_SIZE = 1 << 10
+    HAS_MTIME = 1 << 11
+    MTIME_SECOND_AMBIGUOUS = 1 << 12
+    DIRECTORY = 1 << 13
+    ALL_UNKNOWN_RECORDED = 1 << 14
+    ALL_IGNORED_RECORDED = 1 << 15
 
   The meaning of each bit is described below.
 
--- a/mercurial/pure/parsers.py	Tue Oct 19 20:14:17 2021 +0200
+++ b/mercurial/pure/parsers.py	Wed Oct 20 00:21:41 2021 +0200
@@ -48,19 +48,19 @@
 DIRSTATE_V2_WDIR_TRACKED = 1 << 0
 DIRSTATE_V2_P1_TRACKED = 1 << 1
 DIRSTATE_V2_P2_INFO = 1 << 2
-DIRSTATE_V2_HAS_MODE_AND_SIZE = 1 << 3
-DIRSTATE_V2_HAS_MTIME = 1 << 4
-DIRSTATE_V2_DIRECTORY = 1 << 5
-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
-DIRSTATE_V2_HAS_FALLBACK_EXEC = 1 << 11
-DIRSTATE_V2_FALLBACK_EXEC = 1 << 12
-DIRSTATE_V2_HAS_FALLBACK_SYMLINK = 1 << 13
-DIRSTATE_V2_FALLBACK_SYMLINK = 1 << 14
-DIRSTATE_V2_MTIME_SECOND_AMBIGUOUS = 1 << 15
+DIRSTATE_V2_MODE_EXEC_PERM = 1 << 3
+DIRSTATE_V2_MODE_IS_SYMLINK = 1 << 4
+DIRSTATE_V2_HAS_FALLBACK_EXEC = 1 << 5
+DIRSTATE_V2_FALLBACK_EXEC = 1 << 6
+DIRSTATE_V2_HAS_FALLBACK_SYMLINK = 1 << 7
+DIRSTATE_V2_FALLBACK_SYMLINK = 1 << 8
+DIRSTATE_V2_EXPECTED_STATE_IS_MODIFIED = 1 << 9
+DIRSTATE_V2_HAS_MODE_AND_SIZE = 1 << 10
+DIRSTATE_V2_HAS_MTIME = 1 << 11
+DIRSTATE_V2_MTIME_SECOND_AMBIGUOUS = 1 << 12
+DIRSTATE_V2_DIRECTORY = 1 << 13
+DIRSTATE_V2_ALL_UNKNOWN_RECORDED = 1 << 14
+DIRSTATE_V2_ALL_IGNORED_RECORDED = 1 << 15
 
 
 @attr.s(slots=True, init=False)
--- a/rust/hg-core/src/dirstate_tree/on_disk.rs	Tue Oct 19 20:14:17 2021 +0200
+++ b/rust/hg-core/src/dirstate_tree/on_disk.rs	Wed Oct 20 00:21:41 2021 +0200
@@ -105,19 +105,19 @@
         const WDIR_TRACKED = 1 << 0;
         const P1_TRACKED = 1 << 1;
         const P2_INFO = 1 << 2;
-        const HAS_MODE_AND_SIZE = 1 << 3;
-        const HAS_MTIME = 1 << 4;
-        const DIRECTORY = 1 << 5;
-        const MODE_EXEC_PERM = 1 << 6;
-        const MODE_IS_SYMLINK = 1 << 7;
-        const EXPECTED_STATE_IS_MODIFIED = 1 << 8;
-        const ALL_UNKNOWN_RECORDED = 1 << 9;
-        const ALL_IGNORED_RECORDED = 1 << 10;
-        const HAS_FALLBACK_EXEC = 1 << 11;
-        const FALLBACK_EXEC = 1 << 12;
-        const HAS_FALLBACK_SYMLINK = 1 << 13;
-        const FALLBACK_SYMLINK = 1 << 14;
-        const MTIME_SECOND_AMBIGUOUS = 1 << 15;
+        const MODE_EXEC_PERM = 1 << 3;
+        const MODE_IS_SYMLINK = 1 << 4;
+        const HAS_FALLBACK_EXEC = 1 <<  5;
+        const FALLBACK_EXEC = 1 <<  6;
+        const HAS_FALLBACK_SYMLINK = 1 <<  7;
+        const FALLBACK_SYMLINK = 1 <<  8;
+        const EXPECTED_STATE_IS_MODIFIED = 1 << 9;
+        const HAS_MODE_AND_SIZE = 1 <<10;
+        const HAS_MTIME = 1 <<11;
+        const MTIME_SECOND_AMBIGUOUS = 1 << 12;
+        const DIRECTORY = 1 <<13;
+        const ALL_UNKNOWN_RECORDED = 1 <<14;
+        const ALL_IGNORED_RECORDED = 1 <<15;
     }
 }