Mercurial > hg-stable
changeset 15272:2889d4574726
rebase: simplify check for orphaned descendants
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 15 Oct 2011 14:19:24 -0500 |
parents | 84d4a4ce45fd |
children | 384082750f2c d4addef0ec74 |
files | hgext/rebase.py |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/rebase.py Sat Oct 15 14:19:07 2011 -0500 +++ b/hgext/rebase.py Sat Oct 15 14:19:24 2011 -0500 @@ -198,6 +198,15 @@ if not rebaseset: repo.ui.debug('base is ancestor of destination') result = None + elif not keepf and list(repo.set('first(children(%ld) - %ld)', + rebaseset, rebaseset)): + raise util.Abort( + _("can't remove original changesets with" + " unrebased descendants"), + hint=_('use --keep to keep original changesets')) + else: + result = buildstate(repo, dest, rebaseset, detachf) + if not result: # Empty state built, nothing to rebase ui.status(_('nothing to rebase\n'))