hgext/rebase.py
changeset 38495 ba6d2c32f34a
parent 38492 2394cd58b81f
child 38496 c92fdc27cbdd
--- a/hgext/rebase.py	Tue May 29 00:26:20 2018 +0200
+++ b/hgext/rebase.py	Thu Jun 28 23:36:45 2018 +0530
@@ -818,22 +818,21 @@
         opts[r'dest'] = '_destautoorphanrebase(SRC)'
 
     if dryrun:
-        leaveunfinished = True
-        inmemory = True
-        rbsrt = rebaseruntime(repo, ui, inmemory, pycompat.byteskwargs(opts))
-        try:
-            overrides = {('rebase', 'singletransaction'): True}
-            with ui.configoverride(overrides, 'rebase'):
-                _origrebase(ui, repo, inmemory=True, rbsrt=rbsrt,
-                            leaveunfinished=leaveunfinished, **opts)
-        except error.InMemoryMergeConflictsError:
-            ui.status(_('hit a merge conflict\n'))
-            return 1
-        else:
-            ui.status(_('there will be no conflict, you can rebase\n'))
-            return 0
-        finally:
-            with repo.wlock(), repo.lock():
+        rbsrt = rebaseruntime(repo, ui, inmemory=True,
+                              opts=pycompat.byteskwargs(opts))
+        with repo.wlock(), repo.lock():
+            try:
+                overrides = {('rebase', 'singletransaction'): True}
+                with ui.configoverride(overrides, 'rebase'):
+                    _origrebase(ui, repo, inmemory=True, rbsrt=rbsrt,
+                                leaveunfinished=True, **opts)
+            except error.InMemoryMergeConflictsError:
+                ui.status(_('hit a merge conflict\n'))
+                return 1
+            else:
+                ui.status(_('there will be no conflict, you can rebase\n'))
+                return 0
+            finally:
                 rbsrt._prepareabortorcontinue(isabort=True)
     elif inmemory:
         try: