# HG changeset patch # User Pierre-Yves David # Date 1676331627 -3600 # Node ID 927da152800cf1c52a2e7c9d2ebc0639a7065da8 # Parent b54801fec6640dd321d4d90b76df07d447aad307 dirstate-guard: remove its usage in `backout` We can simply replace it with a transaction. diff -r b54801fec664 -r 927da152800c mercurial/commands.py --- 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])