# HG changeset patch # User Pierre-Yves David # Date 2014-10-18 04:25:48 # Node ID 29bfa964d6d8a5341c533932a73b283b517fbef2 # Parent 16da812ad970f55a003734e57b548f34a5a4b6b9 transaction: only generate file when we actually close the transaction Before this change, the file were written for every call to `tr.close()` exposing data to reader far too early. diff --git a/mercurial/transaction.py b/mercurial/transaction.py --- a/mercurial/transaction.py +++ b/mercurial/transaction.py @@ -266,8 +266,8 @@ class transaction(object): @active def close(self): '''commit the transaction''' - self._generatefiles() if self.count == 1 and self.onclose is not None: + self._generatefiles() self.onclose() self.count -= 1