Mercurial > hg-stable
changeset 19478:e5a5790a3185 stable
rebase: add checkunfinished support (issue3955)
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 24 Jul 2013 23:51:44 -0500 |
parents | e9351f0d9a2a |
children | 11664641fbad |
files | hgext/rebase.py tests/test-rebase-interruptions.t |
diffstat | 2 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/rebase.py Wed Jul 24 23:51:44 2013 -0500 +++ b/hgext/rebase.py Wed Jul 24 23:51:44 2013 -0500 @@ -174,6 +174,7 @@ raise util.Abort(_('cannot specify both a ' 'revision and a source')) + cmdutil.checkunfinished(repo) cmdutil.bailifchanged(repo) if not destf: @@ -798,3 +799,6 @@ entry[1].append(('t', 'tool', '', _("specify merge tool for rebase"))) cmdutil.summaryhooks.add('rebase', summaryhook) + cmdutil.unfinishedstates.append( + ['rebasestate', False, _('rebase in progress'), + _("use 'hg rebase --continue' or 'hg rebase --abort'")])
--- a/tests/test-rebase-interruptions.t Wed Jul 24 23:51:44 2013 -0500 +++ b/tests/test-rebase-interruptions.t Wed Jul 24 23:51:44 2013 -0500 @@ -66,11 +66,11 @@ Force a commit on C during the interruption: - $ hg up -q -C 2 + $ hg up -q -C 2 --config 'extensions.rebase=!' $ echo 'Extra' > Extra $ hg add Extra - $ hg ci -m 'Extra' + $ hg ci -m 'Extra' --config 'extensions.rebase=!' Force this commit onto secret phase @@ -156,11 +156,11 @@ Force a commit on B' during the interruption: - $ hg up -q -C 5 + $ hg up -q -C 5 --config 'extensions.rebase=!' $ echo 'Extra' > Extra $ hg add Extra - $ hg ci -m 'Extra' + $ hg ci -m 'Extra' --config 'extensions.rebase=!' $ hg tglog @ 6: 'Extra' @@ -227,7 +227,7 @@ Change phase on B and B' - $ hg up -q -C 5 + $ hg up -q -C 5 --config 'extensions.rebase=!' $ hg phase --public 1 $ hg phase --public 5 $ hg phase --secret -f 2