diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -15,7 +15,7 @@ http://mercurial.selenic.com/wiki/Rebase ''' from mercurial import hg, util, repair, merge, cmdutil, commands, bookmarks -from mercurial import extensions, patch, scmutil, phases, obsolete +from mercurial import extensions, patch, scmutil, phases, obsolete, error from mercurial.commands import templateopts from mercurial.node import nullrev from mercurial.lock import release @@ -269,8 +269,9 @@ def rebase(ui, repo, **opts): ui.setconfig('ui', 'forcemerge', opts.get('tool', '')) stats = rebasenode(repo, rev, p1, state, collapsef) if stats and stats[3] > 0: - raise util.Abort(_('unresolved conflicts (see hg ' - 'resolve, then hg rebase --continue)')) + raise error.InterventionRequired( + _('unresolved conflicts (see hg ' + 'resolve, then hg rebase --continue)')) finally: ui.setconfig('ui', 'forcemerge', '') cmdutil.duplicatecopies(repo, rev, target) diff --git a/tests/test-rebase-abort.t b/tests/test-rebase-abort.t --- a/tests/test-rebase-abort.t +++ b/tests/test-rebase-abort.t @@ -55,7 +55,7 @@ Conflicting rebase: merging common warning: conflicts during merge. merging common incomplete! (edit conflicts, then use 'hg resolve --mark') - abort: unresolved conflicts (see hg resolve, then hg rebase --continue) + unresolved conflicts (see hg resolve, then hg rebase --continue) [255] Abort: @@ -126,7 +126,7 @@ Rebase and abort without generating new merging c warning: conflicts during merge. merging c incomplete! (edit conflicts, then use 'hg resolve --mark') - abort: unresolved conflicts (see hg resolve, then hg rebase --continue) + unresolved conflicts (see hg resolve, then hg rebase --continue) [255] $ hg tglog diff --git a/tests/test-rebase-bookmarks.t b/tests/test-rebase-bookmarks.t --- a/tests/test-rebase-bookmarks.t +++ b/tests/test-rebase-bookmarks.t @@ -141,7 +141,7 @@ rebase --continue with bookmarks present merging c warning: conflicts during merge. merging c incomplete! (edit conflicts, then use 'hg resolve --mark') - abort: unresolved conflicts (see hg resolve, then hg rebase --continue) + unresolved conflicts (see hg resolve, then hg rebase --continue) [255] $ echo 'c' > c $ hg resolve --mark c diff --git a/tests/test-rebase-check-restore.t b/tests/test-rebase-check-restore.t --- a/tests/test-rebase-check-restore.t +++ b/tests/test-rebase-check-restore.t @@ -69,7 +69,7 @@ Rebasing B onto E - check keep: and phas merging A warning: conflicts during merge. merging A incomplete! (edit conflicts, then use 'hg resolve --mark') - abort: unresolved conflicts (see hg resolve, then hg rebase --continue) + unresolved conflicts (see hg resolve, then hg rebase --continue) [255] Solve the conflict and go on: @@ -122,7 +122,7 @@ Rebase F onto E - check keepbranches: merging A warning: conflicts during merge. merging A incomplete! (edit conflicts, then use 'hg resolve --mark') - abort: unresolved conflicts (see hg resolve, then hg rebase --continue) + unresolved conflicts (see hg resolve, then hg rebase --continue) [255] Solve the conflict and go on: diff --git a/tests/test-rebase-conflicts.t b/tests/test-rebase-conflicts.t --- a/tests/test-rebase-conflicts.t +++ b/tests/test-rebase-conflicts.t @@ -65,7 +65,7 @@ Conflicting rebase: merging common warning: conflicts during merge. merging common incomplete! (edit conflicts, then use 'hg resolve --mark') - abort: unresolved conflicts (see hg resolve, then hg rebase --continue) + unresolved conflicts (see hg resolve, then hg rebase --continue) [255] Try to continue without solving the conflict: diff --git a/tests/test-rebase-detach.t b/tests/test-rebase-detach.t --- a/tests/test-rebase-detach.t +++ b/tests/test-rebase-detach.t @@ -372,7 +372,7 @@ Ensure --continue restores a correct sta merging H warning: conflicts during merge. merging H incomplete! (edit conflicts, then use 'hg resolve --mark') - abort: unresolved conflicts (see hg resolve, then hg rebase --continue) + unresolved conflicts (see hg resolve, then hg rebase --continue) [255] $ hg resolve --all -t internal:local $ hg rebase -c diff --git a/tests/test-rebase-interruptions.t b/tests/test-rebase-interruptions.t --- a/tests/test-rebase-interruptions.t +++ b/tests/test-rebase-interruptions.t @@ -61,7 +61,7 @@ Rebasing B onto E: merging A warning: conflicts during merge. merging A incomplete! (edit conflicts, then use 'hg resolve --mark') - abort: unresolved conflicts (see hg resolve, then hg rebase --continue) + unresolved conflicts (see hg resolve, then hg rebase --continue) [255] Force a commit on C during the interruption: @@ -97,7 +97,7 @@ Resume the rebasing: merging A warning: conflicts during merge. merging A incomplete! (edit conflicts, then use 'hg resolve --mark') - abort: unresolved conflicts (see hg resolve, then hg rebase --continue) + unresolved conflicts (see hg resolve, then hg rebase --continue) [255] Solve the conflict and go on: @@ -151,7 +151,7 @@ Rebasing B onto E: merging A warning: conflicts during merge. merging A incomplete! (edit conflicts, then use 'hg resolve --mark') - abort: unresolved conflicts (see hg resolve, then hg rebase --continue) + unresolved conflicts (see hg resolve, then hg rebase --continue) [255] Force a commit on B' during the interruption: @@ -222,7 +222,7 @@ Rebasing B onto E: merging A warning: conflicts during merge. merging A incomplete! (edit conflicts, then use 'hg resolve --mark') - abort: unresolved conflicts (see hg resolve, then hg rebase --continue) + unresolved conflicts (see hg resolve, then hg rebase --continue) [255] Change phase on B and B' diff --git a/tests/test-rebase-mq-skip.t b/tests/test-rebase-mq-skip.t --- a/tests/test-rebase-mq-skip.t +++ b/tests/test-rebase-mq-skip.t @@ -108,7 +108,7 @@ already has one local mq patch $ hg up -q qtip $ HGMERGE=internal:fail hg rebase - abort: unresolved conflicts (see hg resolve, then hg rebase --continue) + unresolved conflicts (see hg resolve, then hg rebase --continue) [255] $ HGMERGE=internal:local hg resolve --all diff --git a/tests/test-rebase-mq.t b/tests/test-rebase-mq.t --- a/tests/test-rebase-mq.t +++ b/tests/test-rebase-mq.t @@ -63,7 +63,7 @@ Rebase - generate a conflict: merging f warning: conflicts during merge. merging f incomplete! (edit conflicts, then use 'hg resolve --mark') - abort: unresolved conflicts (see hg resolve, then hg rebase --continue) + unresolved conflicts (see hg resolve, then hg rebase --continue) [255] Fix the 1st conflict: @@ -74,7 +74,7 @@ Fix the 1st conflict: merging f warning: conflicts during merge. merging f incomplete! (edit conflicts, then use 'hg resolve --mark') - abort: unresolved conflicts (see hg resolve, then hg rebase --continue) + unresolved conflicts (see hg resolve, then hg rebase --continue) [255] Fix the 2nd conflict: diff --git a/tests/test-rebase-parameters.t b/tests/test-rebase-parameters.t --- a/tests/test-rebase-parameters.t +++ b/tests/test-rebase-parameters.t @@ -416,7 +416,7 @@ Test --tool parameter: $ cd b3 $ hg rebase -s 2 -d 1 --tool internal:fail - abort: unresolved conflicts (see hg resolve, then hg rebase --continue) + unresolved conflicts (see hg resolve, then hg rebase --continue) [255] $ hg resolve -l