Mercurial > hg
changeset 42:91f1fa847158
Fix multiple changes to file per transaction
author | mpm@selenic.com |
---|---|
date | Tue, 10 May 2005 00:31:00 -0800 |
parents | df3f46253878 |
children | 42177b56b949 |
files | mercurial/transaction.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/transaction.py Sat May 07 16:33:31 2005 -0800 +++ b/mercurial/transaction.py Tue May 10 00:31:00 2005 -0800 @@ -17,6 +17,7 @@ def __init__(self, opener, journal): self.opener = opener self.entries = [] + self.map = {} self.journal = journal # abort here if the journal already exists @@ -30,7 +31,9 @@ except: pass def add(self, file, offset): + if file in self.map: return self.entries.append((file, offset)) + self.map[file] = 1 # add enough data to the journal to do the truncate self.file.write("%s\0%d\n" % (file, offset)) self.file.flush()