# HG changeset patch # User FUJIWARA Katsunori # Date 2014-04-15 15:37:24 # Node ID 025ec0f08cb60ca50a5b342ccc006f7a8fa30ab2 # Parent f117a0ba5289c17e8a04bf7cbc7bf3d19e76b593 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. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -4353,7 +4353,7 @@ def outgoing(ui, repo, dest=None, **opts """ if opts.get('graph'): cmdutil.checkunsupportedgraphflags([], opts) - o = hg._outgoing(ui, repo, dest, opts) + o, other = hg._outgoing(ui, repo, dest, opts) if not o: return diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -585,7 +585,7 @@ def _outgoing(ui, repo, dest, opts): o = outgoing.missing if not o: scmutil.nochangesfound(repo.ui, repo, outgoing.excluded) - return o + return o, other def outgoing(ui, repo, dest, opts): def recurse(): @@ -598,7 +598,7 @@ def outgoing(ui, repo, dest, opts): return ret limit = cmdutil.loglimit(opts) - o = _outgoing(ui, repo, dest, opts) + o, other = _outgoing(ui, repo, dest, opts) if not o: return recurse()