# HG changeset patch # User Pierre-Yves David # Date 2014-11-13 10:22:47 # Node ID 59513ec767481e34f4effb05d4b883e34051d27b # Parent ae5d0a22ee7ea3a1ad633010e25f104c262a7404 transaction: always generate file on close The conditionnal was buggy and file were only generated if "onclose" was defined. By luck, "onclose" was always defined. diff --git a/mercurial/transaction.py b/mercurial/transaction.py --- a/mercurial/transaction.py +++ b/mercurial/transaction.py @@ -329,12 +329,13 @@ class transaction(object): @active def close(self): '''commit the transaction''' - if self.count == 1 and self.onclose is not None: + if self.count == 1: self._generatefiles() categories = sorted(self._finalizecallback) for cat in categories: self._finalizecallback[cat](self) - self.onclose() + if self.onclose is not None: + self.onclose() self.count -= 1 if self.count != 0: