changeset 50065:927da152800c

dirstate-guard: remove its usage in `backout` We can simply replace it with a transaction.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 14 Feb 2023 00:40:27 +0100
parents b54801fec664
children ebb8648483db
files mercurial/commands.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Feb 14 00:42:00 2023 +0100
+++ b/mercurial/commands.py	Tue Feb 14 00:40:27 2023 +0100
@@ -28,7 +28,6 @@
     copies,
     debugcommands as debugcommandsmod,
     destutil,
-    dirstateguard,
     discovery,
     encoding,
     error,
@@ -824,7 +823,7 @@
     bheads = repo.branchheads(branch)
     rctx = scmutil.revsingle(repo, hex(parent))
     if not opts.get(b'merge') and op1 != node:
-        with dirstateguard.dirstateguard(repo, b'backout'):
+        with repo.transaction(b"backout"):
             overrides = {(b'ui', b'forcemerge'): opts.get(b'tool', b'')}
             with ui.configoverride(overrides, b'backout'):
                 stats = mergemod.back_out(ctx, parent=repo[parent])