##// END OF EJS Templates
changegroup: rename cg1packer to cgpacker...
Gregory Szorc -
r38938:4c99c6d1 default
parent child Browse files
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 cg1packer(object):
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 cg1packer(repo, filematcher, b'01',
1178 return cgpacker(repo, filematcher, b'01',
1179 useprevdelta=True,
1179 useprevdelta=True,
1180 allowreorder=None,
1180 allowreorder=None,
1181 builddeltaheader=builddeltaheader,
1181 builddeltaheader=builddeltaheader,
1182 manifestsend=b'', sendtreemanifests=False,
1182 manifestsend=b'',
1183 bundlecaps=bundlecaps)
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 cg1packer(repo, filematcher, b'02',
1193 return cgpacker(repo, filematcher, b'02',
1193 useprevdelta=False,
1194 useprevdelta=False,
1194 allowreorder=False,
1195 allowreorder=False,
1195 builddeltaheader=builddeltaheader,
1196 builddeltaheader=builddeltaheader,
1196 manifestsend=b'', sendtreemanifests=False,
1197 manifestsend=b'',
1197 bundlecaps=bundlecaps)
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 cg1packer(repo, filematcher, b'03',
1205 return cgpacker(repo, filematcher, b'03',
1204 useprevdelta=False,
1206 useprevdelta=False,
1205 allowreorder=False,
1207 allowreorder=False,
1206 builddeltaheader=builddeltaheader,
1208 builddeltaheader=builddeltaheader,
1207 manifestsend=closechunk(), sendtreemanifests=True,
1209 manifestsend=closechunk(),
1208 bundlecaps=bundlecaps)
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