Mercurial > public > mercurial-scm > hg-stable
diff rust/hg-core/src/dirstate/entry.rs @ 48099:79bc60ca5946
dirstate-item: introduce a `any_tracked` property
This property is True is the file is tracked anywhere, either the working copy,
or any of the parent.
Differential Revision: https://phab.mercurial-scm.org/D11524
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 29 Sep 2021 14:51:31 +0200 |
parents | 80783e553bd5 |
children | 3c7db97ce541 |
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate/entry.rs Wed Sep 29 14:41:19 2021 +0200 +++ b/rust/hg-core/src/dirstate/entry.rs Wed Sep 29 14:51:31 2021 +0200 @@ -205,6 +205,12 @@ } } + pub fn any_tracked(&self) -> bool { + self.flags.intersects( + Flags::WDIR_TRACKED | Flags::P1_TRACKED | Flags::P2_TRACKED, + ) + } + pub fn state(&self) -> EntryState { if self.removed() { EntryState::Removed