comparison rust/hg-core/src/dirstate/entry.rs @ 48087: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
comparison
equal deleted inserted replaced
48086:80783e553bd5 48087:79bc60ca5946
203 } else { 203 } else {
204 true 204 true
205 } 205 }
206 } 206 }
207 207
208 pub fn any_tracked(&self) -> bool {
209 self.flags.intersects(
210 Flags::WDIR_TRACKED | Flags::P1_TRACKED | Flags::P2_TRACKED,
211 )
212 }
213
208 pub fn state(&self) -> EntryState { 214 pub fn state(&self) -> EntryState {
209 if self.removed() { 215 if self.removed() {
210 EntryState::Removed 216 EntryState::Removed
211 } else if self.merged() { 217 } else if self.merged() {
212 EntryState::Merged 218 EntryState::Merged