diff rust/hg-core/src/dirstate/entry.rs @ 48254:b874e8d81a98

dirstate-v2: preserve the fallback values on disk When the fallback values are set, they are now read and written to disk. See format documentation for details. Differential Revision: https://phab.mercurial-scm.org/D11688
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 18 Oct 2021 10:56:54 +0200
parents 948570aa7630
children f45d35950db6
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate/entry.rs	Mon Oct 18 20:02:05 2021 +0200
+++ b/rust/hg-core/src/dirstate/entry.rs	Mon Oct 18 10:56:54 2021 +0200
@@ -339,7 +339,15 @@
     /// Returns `(wdir_tracked, p1_tracked, p2_info, mode_size, mtime)`
     pub(crate) fn v2_data(
         &self,
-    ) -> (bool, bool, bool, Option<(u32, u32)>, Option<u32>) {
+    ) -> (
+        bool,
+        bool,
+        bool,
+        Option<(u32, u32)>,
+        Option<u32>,
+        Option<bool>,
+        Option<bool>,
+    ) {
         if !self.any_tracked() {
             // TODO: return an Option instead?
             panic!("Accessing v1_state of an untracked DirstateEntry")
@@ -349,7 +357,15 @@
         let p2_info = self.flags.contains(Flags::P2_INFO);
         let mode_size = self.mode_size;
         let mtime = self.mtime;
-        (wdir_tracked, p1_tracked, p2_info, mode_size, mtime)
+        (
+            wdir_tracked,
+            p1_tracked,
+            p2_info,
+            mode_size,
+            mtime,
+            self.get_fallback_exec(),
+            self.get_fallback_symlink(),
+        )
     }
 
     fn v1_state(&self) -> EntryState {