Mercurial > hg
comparison hgext/rebase.py @ 18164:bacf55bd8f90
rebase: allow non-head rebase-set when obsolete is enabled
Obsolescence markers can represent this situation just fine. Rebased
revisions are marked as precursors of the ones create by
rebase. Unrebased descendants becomes "unstable".
If obsolescence is not enabled we keep the current behavior of
aborting. This new behavior only applies when obsolete is
enabled and is subject to future discussion and changes.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Mon, 31 Dec 2012 17:45:52 -0600 |
parents | 9c76da468a19 |
children | 9454e40e047b |
comparison
equal
deleted
inserted
replaced
18163:c5bd753c5bc6 | 18164:bacf55bd8f90 |
---|---|
192 root = None | 192 root = None |
193 | 193 |
194 if not rebaseset: | 194 if not rebaseset: |
195 repo.ui.debug('base is ancestor of destination\n') | 195 repo.ui.debug('base is ancestor of destination\n') |
196 result = None | 196 result = None |
197 elif not keepf and repo.revs('first(children(%ld) - %ld)-hidden()', | 197 elif (not (keepf or obsolete._enabled) |
198 rebaseset, rebaseset): | 198 and repo.revs('first(children(%ld) - %ld)-hidden()', |
199 rebaseset, rebaseset)): | |
199 raise util.Abort( | 200 raise util.Abort( |
200 _("can't remove original changesets with" | 201 _("can't remove original changesets with" |
201 " unrebased descendants"), | 202 " unrebased descendants"), |
202 hint=_('use --keep to keep original changesets')) | 203 hint=_('use --keep to keep original changesets')) |
203 elif not keepf and not repo[root].mutable(): | 204 elif not keepf and not repo[root].mutable(): |