[Updated] [+ ] D11105: largefile: use parentchange during mergerecordupdates
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Mon Jul 19 14:50:04 UTC 2021
marmoute updated this revision to Diff 29464.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D11105?vs=29431&id=29464
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11105/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11105
AFFECTED FILES
hgext/largefiles/overrides.py
CHANGE DETAILS
diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -650,12 +650,15 @@
def mergerecordupdates(orig, repo, actions, branchmerge, getfiledata):
if MERGE_ACTION_LARGEFILE_MARK_REMOVED in actions:
lfdirstate = lfutil.openlfdirstate(repo.ui, 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.remove(lfile)
- # make sure lfile doesn't get synclfdirstate'd as normal
- lfdirstate.add(lfile)
+ with lfdirstate.parentchange():
+ 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.remove(lfile)
+ # make sure lfile doesn't get synclfdirstate'd as normal
+ lfdirstate.add(lfile)
lfdirstate.write()
return orig(repo, actions, branchmerge, getfiledata)
To: marmoute, #hg-reviewers, pulkit
Cc: pulkit, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210719/f4c2b076/attachment-0002.html>
More information about the Mercurial-patches
mailing list