dirstate: simplify some methods' decorator
Since `changing_parents` and `changing_files` are mutually exclusive, having
both `@requires_changing_files` and `@requires_not_changing_parents` on a method
is redundant.
--- a/mercurial/dirstate.py Thu Feb 16 02:19:56 2023 +0100
+++ b/mercurial/dirstate.py Thu Feb 16 02:22:13 2023 +0100
@@ -555,7 +555,6 @@
def copies(self):
return self._map.copymap
- @requires_not_changing_parents
@requires_changing_files
def set_tracked(self, filename, reset_copy=False):
"""a "public" method for generic code to mark a file as tracked
@@ -578,7 +577,6 @@
self._dirty_tracked_set = True
return pre_tracked
- @requires_not_changing_parents
@requires_changing_files
def set_untracked(self, filename):
"""a "public" method for generic code to mark a file as untracked