--- a/hgext/evolve.py Mon Aug 20 12:31:43 2012 +0200
+++ b/hgext/evolve.py Mon Aug 20 14:13:29 2012 +0200
@@ -226,7 +226,8 @@
@command('^stabilize|evolve|solve',
[('n', 'dry-run', False, 'do not perform actions, print what to be done'),
- ('A', 'any', False, 'stabilize any unstable changeset'),],
+ ('A', 'any', False, 'stabilize any unstable changeset'),
+ ('c', 'continue', False, 'continue an interrupted stabilized'), ],
_('[OPTIONS]...'))
def stabilize(ui, repo, **opts):
"""rebase an unstable changeset to make it stable again
@@ -240,6 +241,15 @@
The working directory is updated to the rebased revision.
"""
+ contopt = opts['continue']
+ anyopt = opts['any']
+
+ if contopt:
+ if anyopt:
+ raise util.Abort('can not specify both "--any" and "--continue"')
+ graftcmd = commands.table['graft'][0]
+ return graftcmd(ui, repo, old_obsolete=True, **{'continue': True})
+
obsolete = extensions.find('obsolete')
orig = None
@@ -290,9 +300,9 @@
try:
relocate(repo, orig, target)
except MergeFailure:
- repo.ui.write_err(_('/!\\ stabilize failed /!\\\n'))
- repo.ui.write_err(_('/!\\ Their is no "hg stabilize --continue" /!\\\n'))
- repo.ui.write_err(_('/!\\ use "hg up -C . ; hg stabilize --dry-run" /!\\\n'))
+ repo.opener.write('graftstate', orig.hex() + '\n')
+ repo.ui.write_err(_('stabilize failed!\n'))
+ repo.ui.write_err(_('fix conflict and run "hg stabilize --continue"\n'))
raise
finally:
lock.release()