# HG changeset patch # User Pierre-Yves David # Date 1676890666 -3600 # Node ID bec7182cc4065f9ab305a0e1031cfe3ac18a94c6 # Parent f7981f202b7a9d24476630ee3f75a6fd34ac9d4c 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`). diff -r f7981f202b7a -r bec7182cc406 mercurial/dirstate.py --- 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: