dirstate: drop some safety assert in largefile
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 28 Sep 2021 18:57:20 +0200
changeset 48078 e4c79a1a0b67
parent 48077 46d1b75648f4
child 48079 2943955304b3
dirstate: drop some safety assert in largefile The code involved in `set_possibly_dirty` is now simpler and safe to use even in the cases that the assert covered. So we can drop this assert. It was the last user of `merged_removed` and `from_p2_removed`. Differential Revision: https://phab.mercurial-scm.org/D11511
hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py	Tue Sep 28 18:29:57 2021 +0200
+++ b/hgext/largefiles/overrides.py	Tue Sep 28 18:57:20 2021 +0200
@@ -1787,8 +1787,6 @@
         # mark all clean largefiles as dirty, just in case the update gets
         # interrupted before largefiles and lfdirstate are synchronized
         for lfile in oldclean:
-            entry = lfdirstate._map.get(lfile)
-            assert not (entry.merged_removed or entry.from_p2_removed)
             lfdirstate.set_possibly_dirty(lfile)
         lfdirstate.write()