D6226: rebase: fix bug that prevented dry-run rebases from printing failures

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Fri Apr 12 16:08:07 UTC 2019


durin42 created this revision.
Herald added a reviewer: martinvonz.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6226

AFFECTED FILES
  hgext/rebase.py
  tests/test-rebase-dest.t

CHANGE DETAILS

diff --git a/tests/test-rebase-dest.t b/tests/test-rebase-dest.t
--- a/tests/test-rebase-dest.t
+++ b/tests/test-rebase-dest.t
@@ -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]
 
diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -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'))



To: durin42, martinvonz, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list