--- 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)