changeset 50118:6526c2fb777c

dirstate-guard: remove usage in `rebase` Now that the dirstate change and write are clearer, it does not seems we need to use a dirstate-guard here anymore. The transaction already wrap the full operation.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 14 Feb 2023 00:31:41 +0100
parents 64b3cc021833
children a9562ea222be
files hgext/rebase.py
diffstat 1 files changed, 3 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/rebase.py	Tue Feb 14 00:31:23 2023 +0100
+++ b/hgext/rebase.py	Tue Feb 14 00:31:41 2023 +0100
@@ -1271,15 +1271,9 @@
         # one transaction here. Otherwise, transactions are obtained when
         # committing each node, which is slower but allows partial success.
         with util.acceptintervention(tr):
-            # Same logic for the dirstate guard, except we don't create one when
-            # rebasing in-memory (it's not needed).
-            dsguard = None
-            if singletr and not rbsrt.inmemory:
-                dsguard = dirstateguard.dirstateguard(repo, b'rebase')
-            with util.acceptintervention(dsguard):
-                rbsrt._performrebase(tr)
-                if not rbsrt.dryrun:
-                    rbsrt._finishrebase()
+            rbsrt._performrebase(tr)
+            if not rbsrt.dryrun:
+                rbsrt._finishrebase()
 
 
 def _definedestmap(ui, repo, inmemory, destf, srcf, basef, revf, destspace):