Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches.
REVISION SUMMARY This `state` API is a remnant of the former API and is slated for removal at some point. Any caller of this function will expect an entry that is tracked in the larger sense. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12448 AFFECTED FILES rust/hg-core/src/dirstate_tree/dirstate_map.rs CHANGE DETAILS diff --git a/rust/hg-core/src/dirstate_tree/dirstate_map.rs b/rust/hg-core/src/dirstate_tree/dirstate_map.rs --- a/rust/hg-core/src/dirstate_tree/dirstate_map.rs +++ b/rust/hg-core/src/dirstate_tree/dirstate_map.rs @@ -343,7 +343,13 @@ pub(super) fn state( &self, ) -> Result<Option<EntryState>, DirstateV2ParseError> { - Ok(self.entry()?.map(|e| e.state())) + Ok(self.entry()?.and_then(|e| { + if e.any_tracked() { + Some(e.state()) + } else { + None + } + })) } pub(super) fn cached_directory_mtime( 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