changeset 20406:9e331f1f0573

localrepo: make it clear that changegroupsubset doesn't take bases but roots changegroupsubset will take the parents of the roots to find the bases. Other parts of Mercurial do not expect that, and a result of that is that some bundles contain more changesets than necessary. No real changes here - just renaming a parameter to document what it is.
author Mads Kiilerich <madski@unity3d.com>
date Mon, 10 Feb 2014 00:52:16 +0100
parents cb63aa14aaf7
children 955547eb2e20
files mercurial/localrepo.py
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Tue Feb 04 17:13:45 2014 -0500
+++ b/mercurial/localrepo.py	Mon Feb 10 00:52:16 2014 +0100
@@ -1761,9 +1761,9 @@
             for node in nodes:
                 self.ui.debug("%s\n" % hex(node))
 
-    def changegroupsubset(self, bases, heads, source):
+    def changegroupsubset(self, roots, heads, source):
         """Compute a changegroup consisting of all the nodes that are
-        descendants of any of the bases and ancestors of any of the heads.
+        descendants of any of the roots and ancestors of any of the heads.
         Return a chunkbuffer object whose read() method will return
         successive changegroup chunks.
 
@@ -1775,12 +1775,12 @@
         the changegroup a particular filenode or manifestnode belongs to.
         """
         cl = self.changelog
-        if not bases:
-            bases = [nullid]
+        if not roots:
+            roots = [nullid]
         # TODO: remove call to nodesbetween.
-        csets, bases, heads = cl.nodesbetween(bases, heads)
+        csets, roots, heads = cl.nodesbetween(roots, heads)
         discbases = []
-        for n in bases:
+        for n in roots:
             discbases.extend([p for p in cl.parents(n) if p != nullid])
         outgoing = discovery.outgoing(cl, discbases, heads)
         bundler = changegroup.bundle10(self)