##// END OF EJS Templates
revlog: use raw revisions in revdiff...
Jun Wu -
r31753:5d11b5ed default
parent child Browse files
Show More
@@ -1239,12 +1239,16 b' class revlog(object):'
1239 return rev - 1
1239 return rev - 1
1240
1240
1241 def revdiff(self, rev1, rev2):
1241 def revdiff(self, rev1, rev2):
1242 """return or calculate a delta between two revisions"""
1242 """return or calculate a delta between two revisions
1243
1244 The delta calculated is in binary form and is intended to be written to
1245 revlog data directly. So this function needs raw revision data.
1246 """
1243 if rev1 != nullrev and self.deltaparent(rev2) == rev1:
1247 if rev1 != nullrev and self.deltaparent(rev2) == rev1:
1244 return bytes(self._chunk(rev2))
1248 return bytes(self._chunk(rev2))
1245
1249
1246 return mdiff.textdiff(self.revision(rev1),
1250 return mdiff.textdiff(self.revision(rev1, raw=True),
1247 self.revision(rev2))
1251 self.revision(rev2, raw=True))
1248
1252
1249 def revision(self, nodeorrev, _df=None, raw=False):
1253 def revision(self, nodeorrev, _df=None, raw=False):
1250 """return an uncompressed revision of a given node or revision
1254 """return an uncompressed revision of a given node or revision
@@ -1,2 +1,3 b''
1 local test passed
1 local test passed
2 addgroupcopy test passed
2 abort: crashed: invalid patch
3 abort: crashed: invalid patch
General Comments 0
You need to be logged in to leave comments. Login now