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.
--- a/mercurial/transaction.py Mon Sep 29 00:59:25 2014 -0700
+++ b/mercurial/transaction.py Fri Oct 17 21:25:48 2014 -0700
@@ -266,8 +266,8 @@
@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