dirstate-guard: remove the usage in `import`
It is now redundant with the transaction spawning the same scope.
--- 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'-':