# HG changeset patch # User Pierre-Yves David # Date 1407311331 25200 # Node ID bfc09ea87f3ecb8e143534b8340707036d32725c # Parent 8fb6844a4ff1be8152ed700fab069140b522b079 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. diff -r 8fb6844a4ff1 -r bfc09ea87f3e hgext/mq.py --- 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'):