diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -683,18 +683,12 @@ def overridecalculateupdates( def mergerecordupdates(orig, repo, actions, branchmerge, getfiledata): if MERGE_ACTION_LARGEFILE_MARK_REMOVED in actions: lfdirstate = lfutil.openlfdirstate(repo.ui, repo) - with lfdirstate.changing_parents(repo): - for lfile, args, msg in actions[ - MERGE_ACTION_LARGEFILE_MARK_REMOVED - ]: - # this should be executed before 'orig', to execute 'remove' - # before all other actions - repo.dirstate.update_file( - lfile, p1_tracked=True, wc_tracked=False - ) - # make sure lfile doesn't get synclfdirstate'd as normal - lfdirstate.update_file(lfile, p1_tracked=False, wc_tracked=True) - lfdirstate.write(repo.currenttransaction()) + for lfile, args, msg in actions[MERGE_ACTION_LARGEFILE_MARK_REMOVED]: + # this should be executed before 'orig', to execute 'remove' + # before all other actions + repo.dirstate.update_file(lfile, p1_tracked=True, wc_tracked=False) + # make sure lfile doesn't get synclfdirstate'd as normal + lfdirstate.update_file(lfile, p1_tracked=False, wc_tracked=True) return orig(repo, actions, branchmerge, getfiledata)