Mercurial > hg-stable
changeset 50158:bec7182cc406
dirstate: mark the `copy` method as requiring a `changing_any` context
This is used both when changing parents (e.g. merging with rename) and changing
files (e.g. running `hg rename`).
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 20 Feb 2023 11:57:46 +0100 |
parents | f7981f202b7a |
children | a860298776f0 |
files | mercurial/dirstate.py |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dirstate.py Mon Feb 20 11:54:10 2023 +0100 +++ b/mercurial/dirstate.py Mon Feb 20 11:57:46 2023 +0100 @@ -551,9 +551,7 @@ self._invalidated_context = self._changing_level > 0 self._origpl = None - # XXX since this make the dirstate dirty, we should enforce that it is done - # withing an appropriate change-context that scope the change and ensure it - # eventually get written on disk (or rolled back) + @requires_changing_any def copy(self, source, dest): """Mark dest as a copy of source. Unmark dest if source is None.""" if source == dest: