changeset 42108:1b5cec8b6a1e

rebase: fix bug that prevented dry-run rebases from printing failures As far as I can tell it should be fine to unconditionally skip _prepareabortorcontinue if we're in the process of raising an Abort here. Differential Revision: https://phab.mercurial-scm.org/D6226
author Augie Fackler <augie@google.com>
date Fri, 12 Apr 2019 12:06:13 -0400
parents 8890fce7c13d
children 2a3c0106ded9
files hgext/rebase.py tests/test-rebase-dest.t
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/rebase.py	Fri Apr 12 11:41:33 2019 -0400
+++ b/hgext/rebase.py	Fri Apr 12 12:06:13 2019 -0400
@@ -949,6 +949,9 @@
         except error.InMemoryMergeConflictsError:
             ui.status(_('hit a merge conflict\n'))
             return 1
+        except error.Abort:
+            needsabort = False
+            raise
         else:
             if confirm:
                 ui.status(_('rebase completed successfully\n'))
--- a/tests/test-rebase-dest.t	Fri Apr 12 11:41:33 2019 -0400
+++ b/tests/test-rebase-dest.t	Fri Apr 12 12:06:13 2019 -0400
@@ -214,7 +214,7 @@
   > |
   > Z
   > EOS
-  abort: no rebase in progress
+  abort: source and destination form a cycle
   starting dry-run rebase; repository will not be changed
   [255]