Mercurial > public > mercurial-scm > hg
comparison mercurial/hg.py @ 21050:025ec0f08cb6
hg: make "_outgoing()" return peer object for remote repository
This patch makes "_outgoing()" return peer object for remote
repository, to avoid re-execution "expandpath()", "parseurl()", and
"peer()" on caller side for specified URL.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 16 Apr 2014 00:37:24 +0900 |
parents | f117a0ba5289 |
children | 1004d3cd65fd |
comparison
equal
deleted
inserted
replaced
21049:f117a0ba5289 | 21050:025ec0f08cb6 |
---|---|
583 outgoing = discovery.findcommonoutgoing(repo.unfiltered(), other, revs, | 583 outgoing = discovery.findcommonoutgoing(repo.unfiltered(), other, revs, |
584 force=opts.get('force')) | 584 force=opts.get('force')) |
585 o = outgoing.missing | 585 o = outgoing.missing |
586 if not o: | 586 if not o: |
587 scmutil.nochangesfound(repo.ui, repo, outgoing.excluded) | 587 scmutil.nochangesfound(repo.ui, repo, outgoing.excluded) |
588 return o | 588 return o, other |
589 | 589 |
590 def outgoing(ui, repo, dest, opts): | 590 def outgoing(ui, repo, dest, opts): |
591 def recurse(): | 591 def recurse(): |
592 ret = 1 | 592 ret = 1 |
593 if opts.get('subrepos'): | 593 if opts.get('subrepos'): |
596 sub = ctx.sub(subpath) | 596 sub = ctx.sub(subpath) |
597 ret = min(ret, sub.outgoing(ui, dest, opts)) | 597 ret = min(ret, sub.outgoing(ui, dest, opts)) |
598 return ret | 598 return ret |
599 | 599 |
600 limit = cmdutil.loglimit(opts) | 600 limit = cmdutil.loglimit(opts) |
601 o = _outgoing(ui, repo, dest, opts) | 601 o, other = _outgoing(ui, repo, dest, opts) |
602 if not o: | 602 if not o: |
603 return recurse() | 603 return recurse() |
604 | 604 |
605 if opts.get('newest_first'): | 605 if opts.get('newest_first'): |
606 o.reverse() | 606 o.reverse() |