Mercurial > hg-stable
changeset 22048:bfc09ea87f3e
mq: wrap qfinish phase movement in a transaction
Phases are not yet inside the transaction, but we need to prepare for it. So we
wrap the phase movement inside a transaction.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 06 Aug 2014 00:48:51 -0700 |
parents | 8fb6844a4ff1 |
children | 86c5318b8e5b |
files | hgext/mq.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Wed Aug 06 11:53:08 2014 -0500 +++ b/hgext/mq.py Wed Aug 06 00:48:51 2014 -0700 @@ -930,7 +930,12 @@ oldqbase = repo[qfinished[0]] tphase = repo.ui.config('phases', 'new-commit', phases.draft) if oldqbase.phase() > tphase and oldqbase.p1().phase() <= tphase: - phases.advanceboundary(repo, tphase, qfinished) + tr = repo.transaction('qfinish') + try: + phases.advanceboundary(repo, tphase, qfinished) + tr.close() + finally: + tr.release() def delete(self, repo, patches, opts): if not patches and not opts.get('rev'):