mercurial/revlog.py
branchstable
changeset 12889 5482c6b826f4
parent 12888 ad01fe38afe6
child 12890 b1c839659140
equal deleted inserted replaced
12888:ad01fe38afe6 12889:5482c6b826f4
  1190         prev = curr - 1
  1190         prev = curr - 1
  1191         base = curr
  1191         base = curr
  1192         offset = self.end(prev)
  1192         offset = self.end(prev)
  1193         flags = 0
  1193         flags = 0
  1194         d = None
  1194         d = None
       
  1195         p1r, p2r = self.rev(p1), self.rev(p2)
  1195 
  1196 
  1196         if self._parentdelta:
  1197         if self._parentdelta:
  1197             deltarev, deltanode = self.rev(p1), p1
  1198             deltarev, deltanode = p1r, p1
  1198             flags = REVIDX_PARENTDELTA
  1199             flags = REVIDX_PARENTDELTA
  1199         else:
  1200         else:
  1200             deltarev, deltanode = prev, self.node(prev)
  1201             deltarev, deltanode = prev, self.node(prev)
  1201 
  1202 
  1202         # should we try to build a delta?
  1203         # should we try to build a delta?
  1218             data = compress(text)
  1219             data = compress(text)
  1219             l = len(data[1]) + len(data[0])
  1220             l = len(data[1]) + len(data[0])
  1220             base = curr
  1221             base = curr
  1221 
  1222 
  1222         e = (offset_type(offset, flags), l, textlen,
  1223         e = (offset_type(offset, flags), l, textlen,
  1223              base, link, self.rev(p1), self.rev(p2), node)
  1224              base, link, p1r, p2r, node)
  1224         self.index.insert(-1, e)
  1225         self.index.insert(-1, e)
  1225         self.nodemap[node] = curr
  1226         self.nodemap[node] = curr
  1226 
  1227 
  1227         entry = self._io.packentry(e, self.node, self.version, curr)
  1228         entry = self._io.packentry(e, self.node, self.version, curr)
  1228         if not self._inline:
  1229         if not self._inline: