changeset 47731:485ae37a7ec5

dirstate: enforce `possibly_dirty` in `set_tracked` There is some usecase (like `hg revert`) that requires more agressive `possibly_dirty` setting. So we take a safe path and enforce it in one of the main `normallookup` replacement. Differential Revision: https://phab.mercurial-scm.org/D11173
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 19 Jul 2021 14:02:58 +0200
parents cc438f793b98
children dc610e325302
files mercurial/dirstate.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py	Mon Jul 19 01:17:56 2021 +0200
+++ b/mercurial/dirstate.py	Mon Jul 19 14:02:58 2021 +0200
@@ -478,6 +478,10 @@
         elif not entry.tracked:
             self.normallookup(filename)
             return True
+        # XXX This is probably overkill for more case, but we need this to
+        # fully replace the `normallookup` call with `set_tracked` one.
+        # Consider smoothing this in the future.
+        self.set_possibly_dirty(filename)
         return False
 
     @requires_no_parents_change