changeset 50114:c175b4857498

dirstate: add a comment about the semantic of `dirstate.clear` This method is weird, lets flag it as such.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 20 Feb 2023 11:37:02 +0100
parents dae8dda6f582
children 62f633f751a4
files mercurial/dirstate.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py	Mon Feb 20 14:05:19 2023 +0100
+++ b/mercurial/dirstate.py	Mon Feb 20 11:37:02 2023 +0100
@@ -858,6 +858,9 @@
     # 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