Mercurial > public > mercurial-scm > hg-stable
diff hgext/rebase.py @ 19517:eab2ff59481e stable
rebase: continue abort without strip for immutable csets (issue3997)
This causes us to simply discard the rebase state.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 01 Aug 2013 17:45:13 -0500 |
parents | fe78eb7bcca0 |
children | 12843143663d |
line wrap: on
line diff
--- a/hgext/rebase.py Thu Aug 01 17:33:09 2013 -0500 +++ b/hgext/rebase.py Thu Aug 01 17:45:13 2013 -0500 @@ -609,9 +609,9 @@ dstates = [s for s in state.values() if s != nullrev] immutable = [d for d in dstates if not repo[d].mutable()] if immutable: - raise util.Abort(_("can't abort rebase due to immutable changesets %s") - % ', '.join(str(repo[r]) for r in immutable), - hint=_('see hg help phases for details')) + repo.ui.warn(_("warning: can't clean up immutable changesets %s\n") + % ', '.join(str(repo[r]) for r in immutable), + hint=_('see hg help phases for details')) descendants = set() if dstates: @@ -622,12 +622,12 @@ return -1 else: # Update away from the rebase if necessary - if inrebase(repo, originalwd, state): + if not immutable and inrebase(repo, originalwd, state): merge.update(repo, repo[originalwd].rev(), False, True, False) # Strip from the first rebased revision rebased = filter(lambda x: x > -1 and x != target, state.values()) - if rebased: + if rebased and not immutable: strippoints = [c.node() for c in repo.set('roots(%ld)', rebased)] # no backup of rebased cset versions needed repair.strip(repo.ui, repo, strippoints)