diff mercurial/revset.py @ 15837:cd956049fc14

discovery: introduce outgoing object for result of findcommonoutgoing Simplifies client logic in multiple places since it encapsulates the computation of the common and, more importantly, the missing node lists. This also allows an upcomping patch to communicate precomputed versions of these lists to clients.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 09 Jan 2012 03:47:16 +0100
parents 33ca11b010e2
children 6902e13ddd03
line wrap: on
line diff
--- a/mercurial/revset.py	Mon Jan 09 04:16:00 2012 +0100
+++ b/mercurial/revset.py	Mon Jan 09 03:47:16 2012 +0100
@@ -644,10 +644,10 @@
         revs = [repo.lookup(rev) for rev in revs]
     other = hg.peer(repo, {}, dest)
     repo.ui.pushbuffer()
-    common, outheads = discovery.findcommonoutgoing(repo, other, onlyheads=revs)
+    outgoing = discovery.findcommonoutgoing(repo, other, onlyheads=revs)
     repo.ui.popbuffer()
     cl = repo.changelog
-    o = set([cl.rev(r) for r in repo.changelog.findmissing(common, outheads)])
+    o = set([cl.rev(r) for r in outgoing.missing])
     return [r for r in subset if r in o]
 
 def p1(repo, subset, x):