diff hgext/fix.py @ 49960: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 642e31cb55f0
children 7a8bfc05b691
line wrap: on
line diff
--- a/hgext/fix.py	Tue Dec 13 10:00:04 2022 +0100
+++ b/hgext/fix.py	Wed Jan 25 18:46:20 2023 +0100
@@ -776,7 +776,7 @@
     newp1 = replacements.get(oldp1, oldp1)
     if newp1 != oldp1:
         assert repo.dirstate.p2() == nullid
-        with repo.dirstate.parentchange():
+        with repo.dirstate.parentchange(repo):
             scmutil.movedirstate(repo, repo[newp1])