comparison hgext/rebase.py @ 17027:6c05eebd9fab

merge with stable
author Martin Geisler <mg@aragost.com>
date Thu, 21 Jun 2012 15:10:01 +0200
parents 1093ad1e8903 f8af57c00a29
children efd2e14f7235
comparison
equal deleted inserted replaced
17023:3e2d8120528b 17027:6c05eebd9fab
566 raise util.Abort(_('no rebase in progress')) 566 raise util.Abort(_('no rebase in progress'))
567 567
568 def abort(repo, originalwd, target, state): 568 def abort(repo, originalwd, target, state):
569 'Restore the repository to its original state' 569 'Restore the repository to its original state'
570 dstates = [s for s in state.values() if s != nullrev] 570 dstates = [s for s in state.values() if s != nullrev]
571 if [d for d in dstates if not repo[d].mutable()]: 571 immutable = [d for d in dstates if not repo[d].mutable()]
572 repo.ui.warn(_("warning: immutable rebased changeset detected, " 572 if immutable:
573 "can't abort\n")) 573 raise util.Abort(_("can't abort rebase due to immutable changesets %s")
574 return -1 574 % ', '.join(str(repo[r]) for r in immutable),
575 hint=_('see hg help phases for details'))
575 576
576 descendants = set() 577 descendants = set()
577 if dstates: 578 if dstates:
578 descendants = set(repo.changelog.descendants(dstates)) 579 descendants = set(repo.changelog.descendants(dstates))
579 if descendants - set(dstates): 580 if descendants - set(dstates):