diff mercurial/revlog.py @ 19200:4cfdec944edf

bundle-ng: move group into the bundler No additional semantic changes made.
author Sune Foldager <cryo@cyanite.org>
date Fri, 10 May 2013 21:03:01 +0200
parents c010cb6fdef7
children 7014526d67a8
line wrap: on
line diff
--- a/mercurial/revlog.py	Fri May 10 20:37:41 2013 +0200
+++ b/mercurial/revlog.py	Fri May 10 21:03:01 2013 +0200
@@ -14,7 +14,7 @@
 # import stuff from node for others to import from revlog
 from node import bin, hex, nullid, nullrev
 from i18n import _
-import ancestor, mdiff, parsers, error, util, dagutil
+import ancestor, mdiff, parsers, error, util
 import struct, zlib, errno
 
 _pack = struct.pack
@@ -1143,44 +1143,6 @@
         self._basecache = (curr, chainbase)
         return node
 
-    def group(self, nodelist, bundler, reorder=None):
-        """Calculate a delta group, yielding a sequence of changegroup chunks
-        (strings).
-
-        Given a list of changeset revs, return a set of deltas and
-        metadata corresponding to nodes. The first delta is
-        first parent(nodelist[0]) -> nodelist[0], the receiver is
-        guaranteed to have this parent as it has all history before
-        these changesets. In the case firstparent is nullrev the
-        changegroup starts with a full revision.
-        """
-
-        # if we don't have any revisions touched by these changesets, bail
-        if len(nodelist) == 0:
-            yield bundler.close()
-            return
-
-        # for generaldelta revlogs, we linearize the revs; this will both be
-        # much quicker and generate a much smaller bundle
-        if (self._generaldelta and reorder is not False) or reorder:
-            dag = dagutil.revlogdag(self)
-            revs = set(self.rev(n) for n in nodelist)
-            revs = dag.linearize(revs)
-        else:
-            revs = sorted([self.rev(n) for n in nodelist])
-
-        # add the parent of the first rev
-        p = self.parentrevs(revs[0])[0]
-        revs.insert(0, p)
-
-        # build deltas
-        for r in xrange(len(revs) - 1):
-            prev, curr = revs[r], revs[r + 1]
-            for c in bundler.revchunk(self, curr, prev):
-                yield c
-
-        yield bundler.close()
-
     def addgroup(self, bundle, linkmapper, transaction):
         """
         add a delta group