Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches.
REVISION SUMMARY This will also be used in other places later in the series. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12536 AFFECTED FILES rust/hg-core/src/dirstate/entry.rs CHANGE DETAILS diff --git a/rust/hg-core/src/dirstate/entry.rs b/rust/hg-core/src/dirstate/entry.rs --- a/rust/hg-core/src/dirstate/entry.rs +++ b/rust/hg-core/src/dirstate/entry.rs @@ -417,6 +417,11 @@ self.flags.contains(Flags::WDIR_TRACKED) && !self.in_either_parent() } + pub fn modified(&self) -> bool { + self.flags + .contains(Flags::WDIR_TRACKED | Flags::P1_TRACKED | Flags::P2_INFO) + } + pub fn maybe_clean(&self) -> bool { if !self.flags.contains(Flags::WDIR_TRACKED) { false @@ -463,10 +468,7 @@ } if self.removed() { EntryState::Removed - } else if self - .flags - .contains(Flags::WDIR_TRACKED | Flags::P1_TRACKED | Flags::P2_INFO) - { + } else if self.modified() { EntryState::Merged } else if self.added() { EntryState::Added To: Alphare, #hg-reviewers Cc: mercurial-patches, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel