diff mercurial/merge.py @ 50022:c166b212bdee

dirstate: pass the repo to the `changeparent` method If we want the context to be responsible for writing (and we want it), we need to have access to a localrepository object. So we now requires a localrepository object as an argument to this context manager.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 25 Jan 2023 18:46:20 +0100
parents c7a04bfabd4d
children 7a8bfc05b691
line wrap: on
line diff
--- a/mercurial/merge.py	Tue Dec 13 10:00:04 2022 +0100
+++ b/mercurial/merge.py	Wed Jan 25 18:46:20 2023 +0100
@@ -2155,7 +2155,7 @@
             assert len(getfiledata) == (
                 mresult.len((mergestatemod.ACTION_GET,)) if wantfiledata else 0
             )
-            with repo.dirstate.parentchange():
+            with repo.dirstate.parentchange(repo):
                 ### Filter Filedata
                 #
                 # We gathered "cache" information for the clean file while
@@ -2377,7 +2377,7 @@
         # fix up dirstate for copies and renames
         copies.graftcopies(wctx, ctx, base)
     else:
-        with repo.dirstate.parentchange():
+        with repo.dirstate.parentchange(repo):
             repo.setparents(pctx.node(), pother)
             repo.dirstate.write(repo.currenttransaction())
             # fix up dirstate for copies and renames