Mercurial > hg
diff 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 |
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate/entry.rs Fri Oct 01 02:01:12 2021 +0200 +++ b/rust/hg-core/src/dirstate/entry.rs Fri Oct 01 04:04:09 2021 +0200 @@ -161,6 +161,10 @@ self.in_either_parent() && !self.flags.contains(Flags::WDIR_TRACKED) } + pub fn p2_info(&self) -> bool { + self.flags.contains(Flags::WDIR_TRACKED | Flags::P2_INFO) + } + pub fn merged(&self) -> bool { self.flags .contains(Flags::WDIR_TRACKED | Flags::P1_TRACKED | Flags::P2_INFO)