Patchwork D11511: dirstate: drop some safety assert in largefile

login
register
mail settings
Submitter phabricator
Date Sept. 29, 2021, 8:36 a.m.
Message ID <differential-rev-PHID-DREV-5onyc6f4b46kotim6s5q-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49835/
State Superseded
Headers show

Comments

phabricator - Sept. 29, 2021, 8:36 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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`.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11511

AFFECTED FILES
  hgext/largefiles/overrides.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -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()