mercurial/changegroup.py
changeset 25695 ce3d4b858420
parent 25660 328739ea70c3
parent 25677 af5b2f4ed594
child 25823 2406e2baa937
--- a/mercurial/changegroup.py	Tue Jun 30 22:39:28 2015 -0700
+++ b/mercurial/changegroup.py	Wed Jul 01 16:33:31 2015 -0500
@@ -585,11 +585,13 @@
     cl = repo.changelog
     if not roots:
         roots = [nullid]
-    # TODO: remove call to nodesbetween.
-    csets, roots, heads = cl.nodesbetween(roots, heads)
     discbases = []
     for n in roots:
         discbases.extend([p for p in cl.parents(n) if p != nullid])
+    # TODO: remove call to nodesbetween.
+    csets, roots, heads = cl.nodesbetween(roots, heads)
+    included = set(csets)
+    discbases = [n for n in discbases if n not in included]
     outgoing = discovery.outgoing(cl, discbases, heads)
     bundler = packermap[version][0](repo)
     return getsubset(repo, outgoing, bundler, source, version=version)