# HG changeset patch # User Pierre-Yves David # Date 1676510533 -3600 # Node ID 8eb460e0a2028774b1e4cea5c4d79bf077202bfd # Parent a2def50142ea7648b52528e2e40eb0dfd4f30e66 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. diff -r a2def50142ea -r 8eb460e0a202 mercurial/dirstate.py --- 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