changeset 21206:c77418938d05 stable

transaction: fix file descriptor leak for journal.backupfiles The journal.backupfiles descriptor wasn't being closed. This resulted in hgsubversion test runs having a bagillion descriptors open, which crashed on platforms with low open file limits (like OSX).
author Durham Goode <durham@fb.com>
date Wed, 30 Apr 2014 15:36:38 -0700
parents e2031c8ca4f8
children b9defeeb62e6
files mercurial/transaction.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/transaction.py	Fri Apr 25 18:00:07 2014 -0700
+++ b/mercurial/transaction.py	Wed Apr 30 15:36:38 2014 -0700
@@ -220,6 +220,7 @@
         if self.count != 0:
             return
         self.file.close()
+        self.backupsfile.close()
         self.entries = []
         if self.after:
             self.after()
@@ -243,6 +244,7 @@
         self.count = 0
         self.usages = 0
         self.file.close()
+        self.backupsfile.close()
 
         if self.onabort is not None:
             self.onabort()