Show More
@@ -519,7 +519,7 b' class revisiondelta(object):' | |||||
519 | # Iterable of chunks holding raw delta data. |
|
519 | # Iterable of chunks holding raw delta data. | |
520 | deltachunks = attr.ib() |
|
520 | deltachunks = attr.ib() | |
521 |
|
521 | |||
522 |
class cg |
|
522 | class cgpacker(object): | |
523 | def __init__(self, repo, filematcher, version, allowreorder, |
|
523 | def __init__(self, repo, filematcher, version, allowreorder, | |
524 | useprevdelta, builddeltaheader, manifestsend, |
|
524 | useprevdelta, builddeltaheader, manifestsend, | |
525 | sendtreemanifests, bundlecaps=None): |
|
525 | sendtreemanifests, bundlecaps=None): | |
@@ -1175,12 +1175,13 b' def _makecg1packer(repo, filematcher, bu' | |||||
1175 | builddeltaheader = lambda d: _CHANGEGROUPV1_DELTA_HEADER.pack( |
|
1175 | builddeltaheader = lambda d: _CHANGEGROUPV1_DELTA_HEADER.pack( | |
1176 | d.node, d.p1node, d.p2node, d.linknode) |
|
1176 | d.node, d.p1node, d.p2node, d.linknode) | |
1177 |
|
1177 | |||
1178 |
return cg |
|
1178 | return cgpacker(repo, filematcher, b'01', | |
1179 |
|
|
1179 | useprevdelta=True, | |
1180 |
|
|
1180 | allowreorder=None, | |
1181 |
|
|
1181 | builddeltaheader=builddeltaheader, | |
1182 |
|
|
1182 | manifestsend=b'', | |
1183 |
|
|
1183 | sendtreemanifests=False, | |
|
1184 | bundlecaps=bundlecaps) | |||
1184 |
|
1185 | |||
1185 | def _makecg2packer(repo, filematcher, bundlecaps): |
|
1186 | def _makecg2packer(repo, filematcher, bundlecaps): | |
1186 | builddeltaheader = lambda d: _CHANGEGROUPV2_DELTA_HEADER.pack( |
|
1187 | builddeltaheader = lambda d: _CHANGEGROUPV2_DELTA_HEADER.pack( | |
@@ -1189,23 +1190,25 b' def _makecg2packer(repo, filematcher, bu' | |||||
1189 | # Since generaldelta is directly supported by cg2, reordering |
|
1190 | # Since generaldelta is directly supported by cg2, reordering | |
1190 | # generally doesn't help, so we disable it by default (treating |
|
1191 | # generally doesn't help, so we disable it by default (treating | |
1191 | # bundle.reorder=auto just like bundle.reorder=False). |
|
1192 | # bundle.reorder=auto just like bundle.reorder=False). | |
1192 |
return cg |
|
1193 | return cgpacker(repo, filematcher, b'02', | |
1193 |
|
|
1194 | useprevdelta=False, | |
1194 |
|
|
1195 | allowreorder=False, | |
1195 |
|
|
1196 | builddeltaheader=builddeltaheader, | |
1196 |
|
|
1197 | manifestsend=b'', | |
1197 |
|
|
1198 | sendtreemanifests=False, | |
|
1199 | bundlecaps=bundlecaps) | |||
1198 |
|
1200 | |||
1199 | def _makecg3packer(repo, filematcher, bundlecaps): |
|
1201 | def _makecg3packer(repo, filematcher, bundlecaps): | |
1200 | builddeltaheader = lambda d: _CHANGEGROUPV3_DELTA_HEADER.pack( |
|
1202 | builddeltaheader = lambda d: _CHANGEGROUPV3_DELTA_HEADER.pack( | |
1201 | d.node, d.p1node, d.p2node, d.basenode, d.linknode, d.flags) |
|
1203 | d.node, d.p1node, d.p2node, d.basenode, d.linknode, d.flags) | |
1202 |
|
1204 | |||
1203 |
return cg |
|
1205 | return cgpacker(repo, filematcher, b'03', | |
1204 |
|
|
1206 | useprevdelta=False, | |
1205 |
|
|
1207 | allowreorder=False, | |
1206 |
|
|
1208 | builddeltaheader=builddeltaheader, | |
1207 |
|
|
1209 | manifestsend=closechunk(), | |
1208 |
|
|
1210 | sendtreemanifests=True, | |
|
1211 | bundlecaps=bundlecaps) | |||
1209 |
|
1212 | |||
1210 | _packermap = {'01': (_makecg1packer, cg1unpacker), |
|
1213 | _packermap = {'01': (_makecg1packer, cg1unpacker), | |
1211 | # cg2 adds support for exchanging generaldelta |
|
1214 | # cg2 adds support for exchanging generaldelta |
General Comments 0
You need to be logged in to leave comments.
Login now