Show More
@@ -494,20 +494,6 b' class headerlessfixup(object):' | |||||
494 | return d |
|
494 | return d | |
495 | return readexactly(self._fh, n) |
|
495 | return readexactly(self._fh, n) | |
496 |
|
496 | |||
497 | def ellipsisdata(packer, rev, revlog_, p1, p2, data, linknode): |
|
|||
498 | n = revlog_.node(rev) |
|
|||
499 | p1n, p2n = revlog_.node(p1), revlog_.node(p2) |
|
|||
500 | flags = revlog_.flags(rev) |
|
|||
501 | flags |= revlog.REVIDX_ELLIPSIS |
|
|||
502 | meta = packer.builddeltaheader( |
|
|||
503 | n, p1n, p2n, nullid, linknode, flags) |
|
|||
504 | # TODO: try and actually send deltas for ellipsis data blocks |
|
|||
505 | diffheader = mdiff.trivialdiffheader(len(data)) |
|
|||
506 | l = len(meta) + len(diffheader) + len(data) |
|
|||
507 | return ''.join((chunkheader(l), |
|
|||
508 | meta, |
|
|||
509 | diffheader, |
|
|||
510 | data)) |
|
|||
511 |
|
497 | |||
512 | class cg1packer(object): |
|
498 | class cg1packer(object): | |
513 | deltaheader = _CHANGEGROUPV1_DELTA_HEADER |
|
499 | deltaheader = _CHANGEGROUPV1_DELTA_HEADER | |
@@ -1052,10 +1038,21 b' class cg1packer(object):' | |||||
1052 | p2 = nullrev |
|
1038 | p2 = nullrev | |
1053 | else: |
|
1039 | else: | |
1054 | p1, p2 = sorted(local(p) for p in linkparents) |
|
1040 | p1, p2 = sorted(local(p) for p in linkparents) | |
|
1041 | ||||
1055 | n = store.node(rev) |
|
1042 | n = store.node(rev) | |
1056 |
|
1043 | p1n, p2n = store.node(p1), store.node(p2) | ||
1057 | yield ellipsisdata( |
|
1044 | flags = store.flags(rev) | |
1058 | self, rev, store, p1, p2, store.revision(n), linknode) |
|
1045 | flags |= revlog.REVIDX_ELLIPSIS | |
|
1046 | meta = self.builddeltaheader( | |||
|
1047 | n, p1n, p2n, nullid, linknode, flags) | |||
|
1048 | # TODO: try and actually send deltas for ellipsis data blocks | |||
|
1049 | data = store.revision(n) | |||
|
1050 | diffheader = mdiff.trivialdiffheader(len(data)) | |||
|
1051 | l = len(meta) + len(diffheader) + len(data) | |||
|
1052 | yield ''.join((chunkheader(l), | |||
|
1053 | meta, | |||
|
1054 | diffheader, | |||
|
1055 | data)) | |||
1059 |
|
1056 | |||
1060 | def builddeltaheader(self, node, p1n, p2n, basenode, linknode, flags): |
|
1057 | def builddeltaheader(self, node, p1n, p2n, basenode, linknode, flags): | |
1061 | # do nothing with basenode, it is implicitly the previous one in HG10 |
|
1058 | # do nothing with basenode, it is implicitly the previous one in HG10 |
General Comments 0
You need to be logged in to leave comments.
Login now