Mercurial > public > mercurial-scm > hg
diff hgext/shelve.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 | a3b285882724 |
children | 5836edcbdc2e |
line wrap: on
line diff
--- a/hgext/shelve.py Tue Oct 01 12:20:31 2013 +0200 +++ b/hgext/shelve.py Thu Aug 29 09:22:15 2013 -0700 @@ -156,7 +156,11 @@ # check modified, added, removed, deleted only for flist in repo.status(match=match)[:4]: shelvedfiles.extend(flist) - return repo.commit(message, user, opts.get('date'), match) + saved, repo.mq.checkapplied = repo.mq.checkapplied, False + try: + return repo.commit(message, user, opts.get('date'), match) + finally: + repo.mq.checkapplied = saved if parent.node() != nullid: desc = parent.description().split('\n', 1)[0]