##// END OF EJS Templates
revlog: move file writing to a separate function...
Durham Goode -
r20217:33394f2e default
parent child Browse files
Show More
@@ -1206,6 +1206,15 b' class revlog(object):'
1206 self.nodemap[node] = curr
1206 self.nodemap[node] = curr
1207
1207
1208 entry = self._io.packentry(e, self.node, self.version, curr)
1208 entry = self._io.packentry(e, self.node, self.version, curr)
1209 self._writeentry(transaction, ifh, dfh, entry, data, link, offset)
1210
1211 if type(text) == str: # only accept immutable objects
1212 self._cache = (node, curr, text)
1213 self._basecache = (curr, chainbase)
1214 return node
1215
1216 def _writeentry(self, transaction, ifh, dfh, entry, data, link, offset):
1217 curr = len(self) - 1
1209 if not self._inline:
1218 if not self._inline:
1210 transaction.add(self.datafile, offset)
1219 transaction.add(self.datafile, offset)
1211 transaction.add(self.indexfile, curr * len(entry))
1220 transaction.add(self.indexfile, curr * len(entry))
@@ -1222,11 +1231,6 b' class revlog(object):'
1222 ifh.write(data[1])
1231 ifh.write(data[1])
1223 self.checkinlinesize(transaction, ifh)
1232 self.checkinlinesize(transaction, ifh)
1224
1233
1225 if type(text) == str: # only accept immutable objects
1226 self._cache = (node, curr, text)
1227 self._basecache = (curr, chainbase)
1228 return node
1229
1230 def addgroup(self, bundle, linkmapper, transaction):
1234 def addgroup(self, bundle, linkmapper, transaction):
1231 """
1235 """
1232 add a delta group
1236 add a delta group
General Comments 0
You need to be logged in to leave comments. Login now