Mercurial > hg
diff rust/hg-cpython/src/dirstate/item.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-cpython/src/dirstate/item.rs Fri Oct 01 02:01:12 2021 +0200 +++ b/rust/hg-cpython/src/dirstate/item.rs Fri Oct 01 04:04:09 2021 +0200 @@ -71,6 +71,12 @@ Ok(self.entry(py).get().added()) } + + @property + def p2_info(&self) -> PyResult<bool> { + Ok(self.entry(py).get().p2_info()) + } + @property def merged(&self) -> PyResult<bool> { Ok(self.entry(py).get().merged())