##// END OF EJS Templates
revlog: always open revlogs for reading and appending...
Gregory Szorc -
r26378:e749707f default
parent child Browse files
Show More
@@ -1218,7 +1218,7 b' class revlog(object):'
1218
1218
1219 dfh = None
1219 dfh = None
1220 if not self._inline:
1220 if not self._inline:
1221 dfh = self.opener(self.datafile, "a")
1221 dfh = self.opener(self.datafile, "a+")
1222 ifh = self.opener(self.indexfile, "a+")
1222 ifh = self.opener(self.indexfile, "a+")
1223 try:
1223 try:
1224 return self._addrevision(node, text, transaction, link, p1, p2,
1224 return self._addrevision(node, text, transaction, link, p1, p2,
@@ -1467,7 +1467,7 b' class revlog(object):'
1467 else:
1467 else:
1468 transaction.add(self.indexfile, isize, r)
1468 transaction.add(self.indexfile, isize, r)
1469 transaction.add(self.datafile, end)
1469 transaction.add(self.datafile, end)
1470 dfh = self.opener(self.datafile, "a")
1470 dfh = self.opener(self.datafile, "a+")
1471 def flush():
1471 def flush():
1472 if dfh:
1472 if dfh:
1473 dfh.flush()
1473 dfh.flush()
@@ -1535,8 +1535,8 b' class revlog(object):'
1535 # addrevision switched from inline to conventional
1535 # addrevision switched from inline to conventional
1536 # reopen the index
1536 # reopen the index
1537 ifh.close()
1537 ifh.close()
1538 dfh = self.opener(self.datafile, "a")
1538 dfh = self.opener(self.datafile, "a+")
1539 ifh = self.opener(self.indexfile, "a")
1539 ifh = self.opener(self.indexfile, "a+")
1540 finally:
1540 finally:
1541 if dfh:
1541 if dfh:
1542 dfh.close()
1542 dfh.close()
General Comments 0
You need to be logged in to leave comments. Login now