# HG changeset patch # User Pierre-Yves David # Date 2023-02-20 10:37:02 # Node ID c175b48574986abfe96104588c5126dcc903d66b # Parent dae8dda6f5822cdcac61a24e78f7935de7af9618 dirstate: add a comment about the semantic of `dirstate.clear` This method is weird, lets flag it as such. diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -858,6 +858,9 @@ class dirstate: # 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) + # XXX this method is barely used, as a result: + # - its semantic is unclear + # - do we really needs it ? def clear(self): self._map.clear() self._dirty = True