##// END OF EJS Templates
revlog: compute correct deltaparent in the deltaparent function...
Sune Foldager -
r14208:d62d597b default
parent child Browse files
Show More
@@ -41,7 +41,8 b' class manifest(revlog.revlog):'
41 41 def readfast(self, node):
42 42 '''use the faster of readdelta or read'''
43 43 r = self.rev(node)
44 if self.deltaparent(r) in self.parentrevs(r):
44 deltaparent = self.deltaparent(r)
45 if deltaparent != revlog.nullrev and deltaparent in self.parentrevs(r):
45 46 return self.readdelta(node)
46 47 return self.read(node)
47 48
@@ -830,11 +830,14 b' class revlog(object):'
830 830
831 831 def deltaparent(self, rev):
832 832 """return deltaparent of the given revision"""
833 return rev - 1
833 if self.index[rev][3] == rev:
834 return nullrev
835 else:
836 return rev - 1
834 837
835 838 def revdiff(self, rev1, rev2):
836 839 """return or calculate a delta between two revisions"""
837 if self.base(rev2) != rev2 and self.deltaparent(rev2) == rev1:
840 if rev1 != nullrev and self.deltaparent(rev2) == rev1:
838 841 return self._chunk(rev2)
839 842
840 843 return mdiff.textdiff(self.revision(self.node(rev1)),
General Comments 0
You need to be logged in to leave comments. Login now