# HG changeset patch # User Pierre-Yves David # Date 1676331720 -3600 # Node ID b54801fec6640dd321d4d90b76df07d447aad307 # Parent a9562ea222be94a9fbcc1faceaabc4fc86b077fb dirstate-guard: remove the usage in `import` It is now redundant with the transaction spawning the same scope. diff -r a9562ea222be -r b54801fec664 mercurial/commands.py --- a/mercurial/commands.py Tue Feb 14 00:39:49 2023 +0100 +++ b/mercurial/commands.py Tue Feb 14 00:42:00 2023 +0100 @@ -4247,12 +4247,10 @@ if not opts.get(b'no_commit'): lock = repo.lock tr = lambda: repo.transaction(b'import') - dsguard = util.nullcontextmanager else: lock = util.nullcontextmanager tr = util.nullcontextmanager - dsguard = lambda: dirstateguard.dirstateguard(repo, b'import') - with lock(), tr(), dsguard(): + with lock(), tr(): parents = repo[None].parents() for patchurl in patches: if patchurl == b'-':