Comments
Patch
@@ -1217,9 +1217,9 @@ class revlog(object):
return node
dfh = None
if not self._inline:
- dfh = self.opener(self.datafile, "a")
+ dfh = self.opener(self.datafile, "a+")
ifh = self.opener(self.indexfile, "a+")
try:
return self._addrevision(node, text, transaction, link, p1, p2,
REVIDX_DEFAULT_FLAGS, cachedelta, ifh, dfh)
@@ -1465,9 +1465,9 @@ class revlog(object):
dfh = None
else:
transaction.add(self.indexfile, isize, r)
transaction.add(self.datafile, end)
- dfh = self.opener(self.datafile, "a")
+ dfh = self.opener(self.datafile, "a+")
def flush():
if dfh:
dfh.flush()
ifh.flush()
@@ -1533,10 +1533,10 @@ class revlog(object):
if not dfh and not self._inline:
# addrevision switched from inline to conventional
# reopen the index
ifh.close()
- dfh = self.opener(self.datafile, "a")
- ifh = self.opener(self.indexfile, "a")
+ dfh = self.opener(self.datafile, "a+")
+ ifh = self.opener(self.indexfile, "a+")
finally:
if dfh:
dfh.close()
ifh.close()