mercurial/context.py
changeset 50056 1f369ca9e34c
parent 50055 c5ef535e274e
child 50130 9e1debbb477e
--- a/mercurial/context.py	Wed Feb 15 23:28:20 2023 +0100
+++ b/mercurial/context.py	Wed Feb 15 23:29:04 2023 +0100
@@ -1897,6 +1897,8 @@
                         self._repo.ui.debug(
                             b'skip updating dirstate: identity mismatch\n'
                         )
+                        # throw away anything we have.
+                        dirstate.invalidate()
             except error.LockError:
                 pass
             finally: