changeset 49194:7241b3721ba5

rust-dirstatemap: stop using `.state` in `is_from_other_parent` This is a deprecated API and will be removed one day. Differential Revision: https://phab.mercurial-scm.org/D12537
author Raphaël Gomès <rgomes@octobus.net>
date Tue, 12 Apr 2022 16:24:25 +0200
parents c6c1caf28349
children 748ac6400eaa
files rust/hg-core/src/dirstate/entry.rs
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate/entry.rs	Tue Apr 12 17:29:21 2022 +0200
+++ b/rust/hg-core/src/dirstate/entry.rs	Tue Apr 12 16:24:25 2022 +0200
@@ -655,8 +655,7 @@
     }
 
     pub(crate) fn is_from_other_parent(&self) -> bool {
-        self.state() == EntryState::Normal
-            && self.size() == SIZE_FROM_OTHER_PARENT
+        self.flags.contains(Flags::WDIR_TRACKED | Flags::P2_INFO)
     }
 
     // TODO: other platforms