comparison rust/hg-core/src/dirstate/entry.rs @ 48142:fb3b41d583c2

dirstate-item: introduce a `p2_info` property that combine two others The `merged` and `from_p2` property are always used together so we can expose a combined property instead. Differential Revision: https://phab.mercurial-scm.org/D11585
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 01 Oct 2021 04:04:09 +0200
parents ab5a7fdbf75c
children 21542d4cb568
comparison
equal deleted inserted replaced
48141:42ab0bcb6ded 48142:fb3b41d583c2
159 159
160 pub fn removed(&self) -> bool { 160 pub fn removed(&self) -> bool {
161 self.in_either_parent() && !self.flags.contains(Flags::WDIR_TRACKED) 161 self.in_either_parent() && !self.flags.contains(Flags::WDIR_TRACKED)
162 } 162 }
163 163
164 pub fn p2_info(&self) -> bool {
165 self.flags.contains(Flags::WDIR_TRACKED | Flags::P2_INFO)
166 }
167
164 pub fn merged(&self) -> bool { 168 pub fn merged(&self) -> bool {
165 self.flags 169 self.flags
166 .contains(Flags::WDIR_TRACKED | Flags::P1_TRACKED | Flags::P2_INFO) 170 .contains(Flags::WDIR_TRACKED | Flags::P1_TRACKED | Flags::P2_INFO)
167 } 171 }
168 172