changeset 50064:b54801fec664

dirstate-guard: remove the usage in `import` It is now redundant with the transaction spawning the same scope.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 14 Feb 2023 00:42:00 +0100
parents a9562ea222be
children 927da152800c
files mercurial/commands.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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'-':