Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
15836:926c9ee8d4be | 15837:cd956049fc14 |
---|---|
505 revs, checkout = addbranchrevs(repo, repo, branches, opts.get('rev')) | 505 revs, checkout = addbranchrevs(repo, repo, branches, opts.get('rev')) |
506 if revs: | 506 if revs: |
507 revs = [repo.lookup(rev) for rev in revs] | 507 revs = [repo.lookup(rev) for rev in revs] |
508 | 508 |
509 other = peer(repo, opts, dest) | 509 other = peer(repo, opts, dest) |
510 common, outheads = discovery.findcommonoutgoing(repo, other, revs, | 510 outgoing = discovery.findcommonoutgoing(repo, other, revs, |
511 force=opts.get('force')) | 511 force=opts.get('force')) |
512 o = repo.changelog.findmissing(common, outheads) | 512 o = outgoing.missing |
513 if not o: | 513 if not o: |
514 ui.status(_("no changes found\n")) | 514 ui.status(_("no changes found\n")) |
515 return None | 515 return None |
516 return o | 516 return o |
517 | 517 |