Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dirstate.py @ 50079:e1cff85484e2
dirstate: introduce a `is_changing_any` property
This will embrace other cases than changing parents.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 26 Jan 2023 15:50:45 +0100 |
parents | e333cc169c45 |
children | 0dc2fb4b4b11 |
line wrap: on
line diff
--- a/mercurial/dirstate.py Mon Jan 30 19:21:34 2023 +0100 +++ b/mercurial/dirstate.py Thu Jan 26 15:50:45 2023 +0100 @@ -202,6 +202,14 @@ ) raise error.ProgrammingError(msg) + @property + def is_changing_any(self): + """Returns true if the dirstate is in the middle of a set of changes. + + This returns True for any kind of change. + """ + return self._changing_level > 0 + def pendingparentchange(self): """Returns true if the dirstate is in the middle of a set of changes that modify the dirstate parent.