Mercurial > public > mercurial-scm > hg-stable
diff hgext/mq.py @ 19856:28b1b7b9b4a9
shelve: allow shelving of a change with an mq patch applied
We allow shelving of of changes on top of a MQ repository. MQ will
not allow repository changes on top of applied patches. We introduce
checkapplied in MQ to bypass this check.
author | David Soria Parra <dsp@experimentalworks.net> |
---|---|
date | Thu, 29 Aug 2013 09:22:15 -0700 |
parents | 4b1cbcfdabf7 |
children | fb583a1efef0 |
line wrap: on
line diff
--- a/hgext/mq.py Tue Oct 01 12:20:31 2013 +0200 +++ b/hgext/mq.py Thu Aug 29 09:22:15 2013 -0700 @@ -347,6 +347,7 @@ except error.ConfigError: self.gitmode = ui.config('mq', 'git', 'auto').lower() self.plainmode = ui.configbool('mq', 'plain', False) + self.checkapplied = True @util.propertycache def applied(self): @@ -3264,7 +3265,7 @@ return queue(self.ui, self.baseui, self.path) def abortifwdirpatched(self, errmsg, force=False): - if self.mq.applied and not force: + if self.mq.applied and self.mq.checkapplied and not force: parents = self.dirstate.parents() patches = [s.node for s in self.mq.applied] if parents[0] in patches or parents[1] in patches: @@ -3280,7 +3281,7 @@ editor, extra) def checkpush(self, force, revs): - if self.mq.applied and not force: + if self.mq.applied and self.mq.checkapplied and not force: outapplied = [e.node for e in self.mq.applied] if revs: # Assume applied patches have no non-patch descendants and