Mercurial > hg-stable
changeset 23357:ba033f461f00
transaction: have _generatefile return a boolean
The function returns True if any files were generated. This will be
used to know if any pending files have been written.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 17 Oct 2014 21:57:32 -0700 |
parents | 140c21fbf4eb |
children | 1b51d1b05482 |
files | mercurial/transaction.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/transaction.py Mon Sep 29 01:29:08 2014 -0700 +++ b/mercurial/transaction.py Fri Oct 17 21:57:32 2014 -0700 @@ -264,7 +264,9 @@ def _generatefiles(self, suffix=''): # write files registered for generation + any = False for entry in sorted(self._filegenerators.values()): + any = True order, filenames, genfunc, location = entry vfs = self._vfsmap[location] files = [] @@ -280,6 +282,7 @@ finally: for f in files: f.close() + return any @active def find(self, file):