hgext/largefiles/lfutil.py
changeset 50050 22cd517bc6b0
parent 50027 0b4a6912292e
child 50116 9b49809eb612
--- a/hgext/largefiles/lfutil.py	Sun Feb 05 12:05:23 2023 +0100
+++ b/hgext/largefiles/lfutil.py	Sun Feb 05 12:09:52 2023 +0100
@@ -601,8 +601,7 @@
 def markcommitted(orig, ctx, node):
     repo = ctx.repo()
 
-    lfdirstate = openlfdirstate(repo.ui, repo)
-    with lfdirstate.changing_parents(repo):
+    with repo.dirstate.changing_parents(repo):
         orig(node)
 
         # ATTENTION: "ctx.files()" may differ from "repo[node].files()"
@@ -614,11 +613,11 @@
         # - 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:
                 synclfdirstate(repo, lfdirstate, lfile, False)
-    lfdirstate.write(repo.currenttransaction())
 
     # As part of committing, copy all of the largefiles into the cache.
     #