diff mercurial/hg.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 60344b83e442
children 12dea4d998ec
line wrap: on
line diff
--- a/mercurial/hg.py	Mon Jan 09 04:16:00 2012 +0100
+++ b/mercurial/hg.py	Mon Jan 09 03:47:16 2012 +0100
@@ -507,9 +507,9 @@
         revs = [repo.lookup(rev) for rev in revs]
 
     other = peer(repo, opts, dest)
-    common, outheads = discovery.findcommonoutgoing(repo, other, revs,
-                                                    force=opts.get('force'))
-    o = repo.changelog.findmissing(common, outheads)
+    outgoing = discovery.findcommonoutgoing(repo, other, revs,
+                                            force=opts.get('force'))
+    o = outgoing.missing
     if not o:
         ui.status(_("no changes found\n"))
         return None