Patchwork D4084: changegroup: rename cg1packer to cgpacker

login
register
mail settings
Submitter phabricator
Date Aug. 6, 2018, 6:57 a.m.
Message ID <2d8d6317effc11b8c7ee17ba3a64d23f@localhost.localdomain>
Download mbox | patch
Permalink /patch/33304/
State Not Applicable
Headers show

Comments

phabricator - Aug. 6, 2018, 6:57 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG4c99c6d1ef95: changegroup: rename cg1packer to cgpacker (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4084?vs=9846&id=9960

REVISION DETAIL
  https://phab.mercurial-scm.org/D4084

AFFECTED FILES
  mercurial/changegroup.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -519,7 +519,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):
@@ -1175,37 +1175,40 @@ 
     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(
         d.node, d.p1node, d.p2node, d.basenode, d.linknode)
 
     # 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