khanchi97 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers.
REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2579 AFFECTED FILES hgext/mq.py hgext/rebase.py CHANGE DETAILS diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -1634,10 +1634,11 @@ # This check isn't strictly necessary, since mq detects commits over an # applied patch. But it prevents messing up the working directory when # a partially completed rebase is blocked by mq. - if 'qtip' in repo.tags(): - mqapplied = set(repo[s.node].rev() for s in repo.mq.applied) - if set(destmap.values()) & mqapplied: - raise error.Abort(_('cannot rebase onto an applied mq patch')) + if not repo.vfs.readlines('journal.desc')[1] == 'unshelve\n': + if 'qtip' in repo.tags(): + mqapplied = set(repo[s.node].rev() for s in repo.mq.applied) + if set(destmap.values()) & mqapplied: + raise error.Abort(_('cannot rebase onto an applied mq patch')) # Get "cycle" error early by exhausting the generator. sortedsrc = list(sortsource(destmap)) # a list of sorted revs diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -3482,9 +3482,10 @@ force=False, editor=False, extra=None): if extra is None: extra = {} - self.abortifwdirpatched( - _('cannot commit over an applied mq patch'), - force) + if not repo.vfs.readlines('journal.desc')[1] == 'unshelve\n': + self.abortifwdirpatched( + _('cannot commit over an applied mq patch'), + force) return super(mqrepo, self).commit(text, user, date, match, force, editor, extra) To: khanchi97, #hg-reviewers Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel