##// END OF EJS Templates
Fix multiple changes to file per transaction
mpm@selenic.com -
r42:91f1fa84 default
parent child Browse files
Show More
@@ -17,6 +17,7 b' class transaction:'
17 17 def __init__(self, opener, journal):
18 18 self.opener = opener
19 19 self.entries = []
20 self.map = {}
20 21 self.journal = journal
21 22
22 23 # abort here if the journal already exists
@@ -30,7 +31,9 b' class transaction:'
30 31 except: pass
31 32
32 33 def add(self, file, offset):
34 if file in self.map: return
33 35 self.entries.append((file, offset))
36 self.map[file] = 1
34 37 # add enough data to the journal to do the truncate
35 38 self.file.write("%s\0%d\n" % (file, offset))
36 39 self.file.flush()
General Comments 0
You need to be logged in to leave comments. Login now