diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py --- a/mercurial/changegroup.py +++ b/mercurial/changegroup.py @@ -522,7 +522,7 @@ # Iterable of chunks holding raw delta data. deltachunks = attr.ib() -class cg1packer(object): +class cgpacker(object): def __init__(self, repo, filematcher, version, allowreorder, useprevdelta, builddeltaheader, manifestsend, sendtreemanifests, bundlecaps=None): @@ -1178,12 +1178,13 @@ builddeltaheader = lambda d: _CHANGEGROUPV1_DELTA_HEADER.pack( d.node, d.p1node, d.p2node, d.linknode) - return cg1packer(repo, filematcher, b'01', - useprevdelta=True, - allowreorder=None, - builddeltaheader=builddeltaheader, - manifestsend=b'', sendtreemanifests=False, - bundlecaps=bundlecaps) + return cgpacker(repo, filematcher, b'01', + useprevdelta=True, + allowreorder=None, + builddeltaheader=builddeltaheader, + manifestsend=b'', + sendtreemanifests=False, + bundlecaps=bundlecaps) def _makecg2packer(repo, filematcher, bundlecaps): builddeltaheader = lambda d: _CHANGEGROUPV2_DELTA_HEADER.pack( @@ -1192,23 +1193,25 @@ # Since generaldelta is directly supported by cg2, reordering # generally doesn't help, so we disable it by default (treating # bundle.reorder=auto just like bundle.reorder=False). - return cg1packer(repo, filematcher, b'02', - useprevdelta=False, - allowreorder=False, - builddeltaheader=builddeltaheader, - manifestsend=b'', sendtreemanifests=False, - bundlecaps=bundlecaps) + return cgpacker(repo, filematcher, b'02', + useprevdelta=False, + allowreorder=False, + builddeltaheader=builddeltaheader, + manifestsend=b'', + sendtreemanifests=False, + bundlecaps=bundlecaps) def _makecg3packer(repo, filematcher, bundlecaps): builddeltaheader = lambda d: _CHANGEGROUPV3_DELTA_HEADER.pack( d.node, d.p1node, d.p2node, d.basenode, d.linknode, d.flags) - return cg1packer(repo, filematcher, b'03', - useprevdelta=False, - allowreorder=False, - builddeltaheader=builddeltaheader, - manifestsend=closechunk(), sendtreemanifests=True, - bundlecaps=bundlecaps) + return cgpacker(repo, filematcher, b'03', + useprevdelta=False, + allowreorder=False, + builddeltaheader=builddeltaheader, + manifestsend=closechunk(), + sendtreemanifests=True, + bundlecaps=bundlecaps) _packermap = {'01': (_makecg1packer, cg1unpacker), # cg2 adds support for exchanging generaldelta