mercurial/revlog.py
changeset 2077 4d0700ae0991
parent 2076 d007df6daf8e
child 2078 441ea218414e
equal deleted inserted replaced
2076:d007df6daf8e 2077:4d0700ae0991
   776                 f.write(data[0])
   776                 f.write(data[0])
   777             f.write(data[1])
   777             f.write(data[1])
   778             f = self.opener(self.indexfile, "a")
   778             f = self.opener(self.indexfile, "a")
   779         else:
   779         else:
   780             f = self.opener(self.indexfile, "a+")
   780             f = self.opener(self.indexfile, "a+")
       
   781             f.seek(0, 2)
   781             transaction.add(self.indexfile, f.tell())
   782             transaction.add(self.indexfile, f.tell())
   782 
   783 
   783         if len(self.index) == 1 and self.version != 0:
   784         if len(self.index) == 1 and self.version != 0:
   784             l = struct.pack(versionformat, self.version)
   785             l = struct.pack(versionformat, self.version)
   785             f.write(l)
   786             f.write(l)
   906         start = end = measure = 0
   907         start = end = measure = 0
   907         if r:
   908         if r:
   908             end = self.end(t)
   909             end = self.end(t)
   909 
   910 
   910         ifh = self.opener(self.indexfile, "a+")
   911         ifh = self.opener(self.indexfile, "a+")
       
   912         ifh.seek(0, 2)
   911         transaction.add(self.indexfile, ifh.tell())
   913         transaction.add(self.indexfile, ifh.tell())
   912         if self.inlinedata():
   914         if self.inlinedata():
   913             dfh = None
   915             dfh = None
   914         else:
   916         else:
   915             transaction.add(self.datafile, end)
   917             transaction.add(self.datafile, end)