rebase: switch from util.Abort to util.InterventionRequired where appropriate (bc)
--- a/hgext/rebase.py Fri Feb 08 16:28:24 2013 -0600
+++ b/hgext/rebase.py Fri Feb 08 16:27:59 2013 -0600
@@ -15,7 +15,7 @@
'''
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 @@
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)
--- a/tests/test-rebase-abort.t Fri Feb 08 16:28:24 2013 -0600
+++ b/tests/test-rebase-abort.t Fri Feb 08 16:27:59 2013 -0600
@@ -55,7 +55,7 @@
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 @@
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
--- a/tests/test-rebase-bookmarks.t Fri Feb 08 16:28:24 2013 -0600
+++ b/tests/test-rebase-bookmarks.t Fri Feb 08 16:27:59 2013 -0600
@@ -141,7 +141,7 @@
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
--- a/tests/test-rebase-check-restore.t Fri Feb 08 16:28:24 2013 -0600
+++ b/tests/test-rebase-check-restore.t Fri Feb 08 16:27:59 2013 -0600
@@ -69,7 +69,7 @@
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 @@
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:
--- a/tests/test-rebase-conflicts.t Fri Feb 08 16:28:24 2013 -0600
+++ b/tests/test-rebase-conflicts.t Fri Feb 08 16:27:59 2013 -0600
@@ -65,7 +65,7 @@
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:
--- a/tests/test-rebase-detach.t Fri Feb 08 16:28:24 2013 -0600
+++ b/tests/test-rebase-detach.t Fri Feb 08 16:27:59 2013 -0600
@@ -372,7 +372,7 @@
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
--- a/tests/test-rebase-interruptions.t Fri Feb 08 16:28:24 2013 -0600
+++ b/tests/test-rebase-interruptions.t Fri Feb 08 16:27:59 2013 -0600
@@ -61,7 +61,7 @@
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 @@
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 @@
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 @@
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'
--- a/tests/test-rebase-mq-skip.t Fri Feb 08 16:28:24 2013 -0600
+++ b/tests/test-rebase-mq-skip.t Fri Feb 08 16:27:59 2013 -0600
@@ -108,7 +108,7 @@
$ 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
--- a/tests/test-rebase-mq.t Fri Feb 08 16:28:24 2013 -0600
+++ b/tests/test-rebase-mq.t Fri Feb 08 16:27:59 2013 -0600
@@ -63,7 +63,7 @@
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 @@
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:
--- a/tests/test-rebase-parameters.t Fri Feb 08 16:28:24 2013 -0600
+++ b/tests/test-rebase-parameters.t Fri Feb 08 16:27:59 2013 -0600
@@ -416,7 +416,7 @@
$ 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