changeset 47656:b1b6d0cad455

largefile: use `parentchange` markcommitted Differential Revision: https://phab.mercurial-scm.org/D11112
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 08 Jul 2021 22:04:31 +0200
parents 0ab58b1f228f
children 1bad89a67745
files hgext/largefiles/lfutil.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/lfutil.py	Thu Jul 08 03:54:54 2021 +0200
+++ b/hgext/largefiles/lfutil.py	Thu Jul 08 22:04:31 2021 +0200
@@ -574,7 +574,8 @@
 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 @@
         # - 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: