changeset 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
files mercurial/commands.py mercurial/hg.py
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Apr 16 00:37:24 2014 +0900
+++ b/mercurial/commands.py	Wed Apr 16 00:37:24 2014 +0900
@@ -4353,7 +4353,7 @@
     """
     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
 
--- a/mercurial/hg.py	Wed Apr 16 00:37:24 2014 +0900
+++ b/mercurial/hg.py	Wed Apr 16 00:37:24 2014 +0900
@@ -585,7 +585,7 @@
     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 @@
         return ret
 
     limit = cmdutil.loglimit(opts)
-    o = _outgoing(ui, repo, dest, opts)
+    o, other = _outgoing(ui, repo, dest, opts)
     if not o:
         return recurse()