Mercurial > public > mercurial-scm > hg-stable
diff mercurial/pure/parsers.py @ 49915:3eac92509484
dirstate-entry: add `modified` property
This was already done in the Rust implementation and is a useful primitive.
The C implementation had this called `merged`, but wasn't used anywhere.
It will be used in the next changeset.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Mon, 02 May 2022 11:40:33 +0200 |
parents | 4c75f00b199e |
children | 493034cc3265 |
line wrap: on
line diff
--- a/mercurial/pure/parsers.py Mon Dec 19 16:22:01 2022 +0100 +++ b/mercurial/pure/parsers.py Mon May 02 11:40:33 2022 +0200 @@ -435,6 +435,11 @@ return self._wc_tracked and not (self._p1_tracked or self._p2_info) @property + def modified(self): + """True if the file has been modified""" + return self._wc_tracked and self._p1_tracked and self._p2_info + + @property def maybe_clean(self): """True if the file has a chance to be in the "clean" state""" if not self._wc_tracked: