changeset 20408:3392695abd68

shelve: really pass publicancestors to changegroupsubset - not the parents publicancestors returned the parents of the public ancestors ... and changegroupsubset used the parents of these as base for the bundle. That gave bundles with one layer of changesets more than necessary.
author Mads Kiilerich <madski@unity3d.com>
date Mon, 10 Feb 2014 00:52:56 +0100
parents 955547eb2e20
children 0b7a9940a397
files hgext/shelve.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/shelve.py	Mon Feb 10 00:52:46 2014 +0100
+++ b/hgext/shelve.py	Mon Feb 10 00:52:56 2014 +0100
@@ -122,22 +122,21 @@
     """subcommand that creates a new shelve"""
 
     def publicancestors(ctx):
-        """Compute the heads of the public ancestors of a commit.
+        """Compute the public ancestors of a commit.
 
-        Much faster than the revset heads(ancestors(ctx) - draft())"""
+        Much faster than the revset ancestors(ctx) & draft()"""
         seen = set([nullrev])
         visit = util.deque()
         visit.append(ctx)
         while visit:
             ctx = visit.popleft()
+            yield ctx.node()
             for parent in ctx.parents():
                 rev = parent.rev()
                 if rev not in seen:
                     seen.add(rev)
                     if parent.mutable():
                         visit.append(parent)
-                    else:
-                        yield parent.node()
 
     wctx = repo[None]
     parents = wctx.parents()