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

login
register
mail settings
Submitter phabricator
Date April 12, 2019, 4:08 p.m.
Message ID <differential-rev-PHID-DREV-jonqmiu27eyo7u3bgycl-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/39569/
State Superseded
Headers show

Comments

phabricator - April 12, 2019, 4:08 p.m.
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




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

Patch

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'))