[PATCH 09 of 19] mq: use .invalidate to cancel dirty mq state when cancelling transaction

Mads Kiilerich mads at kiilerich.com
Thu Jan 12 19:32:43 CST 2012


# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1326245395 -3600
# Node ID 83cdc87e4f3a0ef259d86201030137dda0cc0827
# Parent  84f79598db7e418e12fd54359225df235004cce5
mq: use .invalidate to cancel dirty mq state when cancelling transaction

Before the code optimistically relied on savedirty not being called a cancelled
transaction. If it was called it could save incorrect data.

Instead we now start using the invalidate method introduced in b169ba60eebe.

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -654,6 +654,7 @@
                 finally:
                     repo.invalidate()
                     repo.dirstate.invalidate()
+                    self.invalidate()
                 raise
         finally:
             release(tr, lock, wlock)


More information about the Mercurial-devel mailing list