# HG changeset patch # User Pierre-Yves David # Date 2021-07-08 20:04:31 # Node ID b1b6d0cad4554edd7cf520d3770679bcf0d73e2f # Parent 0ab58b1f228fe8da1787f404710c8320ec8e3c3f largefile: use `parentchange` markcommitted Differential Revision: https://phab.mercurial-scm.org/D11112 diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py --- a/hgext/largefiles/lfutil.py +++ b/hgext/largefiles/lfutil.py @@ -574,7 +574,8 @@ def synclfdirstate(repo, lfdirstate, lfi def markcommitted(orig, ctx, node): repo = ctx.repo() - with ctx._repo.dirstate.parentchange(): + lfdirstate = openlfdirstate(repo.ui, repo) + with lfdirstate.parentchange(): orig(node) # ATTENTION: "ctx.files()" may differ from "repo[node].files()" @@ -586,7 +587,6 @@ def markcommitted(orig, ctx, node): # - have to be marked as "n" after commit, but # - aren't listed in "repo[node].files()" - lfdirstate = openlfdirstate(repo.ui, repo) for f in ctx.files(): lfile = splitstandin(f) if lfile is not None: