Show More
@@ -36,9 +36,7 b' class manifest(revlog.revlog):' | |||||
36 |
|
36 | |||
37 | def readdelta(self, node): |
|
37 | def readdelta(self, node): | |
38 | r = self.rev(node) |
|
38 | r = self.rev(node) | |
39 | if self._parentdelta: |
|
|||
40 |
|
|
39 | return self.parse(mdiff.patchtext(self.revdiff(self.deltaparent(r), r))) | |
41 | return self.parse(mdiff.patchtext(self.revdiff(r - 1, r))) |
|
|||
42 |
|
40 | |||
43 | def read(self, node): |
|
41 | def read(self, node): | |
44 | if node == revlog.nullid: |
|
42 | if node == revlog.nullid: |
@@ -1018,16 +1018,14 b' class revlog(object):' | |||||
1018 |
|
1018 | |||
1019 | def deltaparent(self, rev): |
|
1019 | def deltaparent(self, rev): | |
1020 | """return previous revision or parentrev according to flags""" |
|
1020 | """return previous revision or parentrev according to flags""" | |
1021 |
if self. |
|
1021 | if self.flags(rev) & REVIDX_PARENTDELTA: | |
1022 | return nullrev |
|
|||
1023 | elif self.flags(rev) & REVIDX_PARENTDELTA: |
|
|||
1024 | return self.parentrevs(rev)[0] |
|
1022 | return self.parentrevs(rev)[0] | |
1025 | else: |
|
1023 | else: | |
1026 | return rev - 1 |
|
1024 | return rev - 1 | |
1027 |
|
1025 | |||
1028 | def revdiff(self, rev1, rev2): |
|
1026 | def revdiff(self, rev1, rev2): | |
1029 | """return or calculate a delta between two revisions""" |
|
1027 | """return or calculate a delta between two revisions""" | |
1030 |
if |
|
1028 | if self.base(rev2) != rev2 and self.deltaparent(rev2) == rev1: | |
1031 | return self._chunk(rev2) |
|
1029 | return self._chunk(rev2) | |
1032 |
|
1030 | |||
1033 | return mdiff.textdiff(self.revision(self.node(rev1)), |
|
1031 | return mdiff.textdiff(self.revision(self.node(rev1)), |
General Comments 0
You need to be logged in to leave comments.
Login now