Patchwork D11695: dirstate-v2: read the fallback value in Rust

login
register
mail settings
Submitter phabricator
Date Oct. 19, 2021, 6:18 p.m.
Message ID <differential-rev-PHID-DREV-nyjd6ggaxzjpnwkcy7ek-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50018/
State Superseded
Headers show

Comments

phabricator - Oct. 19, 2021, 6:18 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This was overlooked in a previous commit.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11695

AFFECTED FILES
  rust/hg-core/src/dirstate_tree/on_disk.rs

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/rust/hg-core/src/dirstate_tree/on_disk.rs b/rust/hg-core/src/dirstate_tree/on_disk.rs
--- a/rust/hg-core/src/dirstate_tree/on_disk.rs
+++ b/rust/hg-core/src/dirstate_tree/on_disk.rs
@@ -374,14 +374,26 @@ 
         } else {
             None
         };
+        let fallback_exec = if self.flags().contains(Flags::HAS_FALLBACK_EXEC)
+        {
+            Some(self.flags().contains(Flags::FALLBACK_EXEC))
+        } else {
+            None
+        };
+        let fallback_symlink =
+            if self.flags().contains(Flags::HAS_FALLBACK_SYMLINK) {
+                Some(self.flags().contains(Flags::FALLBACK_SYMLINK))
+            } else {
+                None
+            };
         DirstateEntry::from_v2_data(
             wdir_tracked,
             p1_tracked,
             p2_info,
             mode_size,
             mtime,
-            None,
-            None,
+            fallback_exec,
+            fallback_symlink,
         )
     }