Mercurial > hg
comparison rust/hg-core/src/dirstate/entry.rs @ 48143:21542d4cb568
dirstate-item: introduce a `p1_tracked` property
It is useful to simplify various conditional that use `any_tracked and not
added`.
Differential Revision: https://phab.mercurial-scm.org/D11586
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 01 Oct 2021 04:07:21 +0200 |
parents | fb3b41d583c2 |
children | 6ac2b417d5d7 |
comparison
equal
deleted
inserted
replaced
48142:fb3b41d583c2 | 48143:21542d4cb568 |
---|---|
151 | 151 |
152 pub fn tracked(&self) -> bool { | 152 pub fn tracked(&self) -> bool { |
153 self.flags.contains(Flags::WDIR_TRACKED) | 153 self.flags.contains(Flags::WDIR_TRACKED) |
154 } | 154 } |
155 | 155 |
156 pub fn p1_tracked(&self) -> bool { | |
157 self.flags.contains(Flags::P1_TRACKED) | |
158 } | |
159 | |
156 fn in_either_parent(&self) -> bool { | 160 fn in_either_parent(&self) -> bool { |
157 self.flags.intersects(Flags::P1_TRACKED | Flags::P2_INFO) | 161 self.flags.intersects(Flags::P1_TRACKED | Flags::P2_INFO) |
158 } | 162 } |
159 | 163 |
160 pub fn removed(&self) -> bool { | 164 pub fn removed(&self) -> bool { |