[PATCH 1 of 3 v3] changegroup: rename _computeoutgoing to computeoutgoing

Gregory Szorc gregory.szorc at gmail.com
Tue Jun 2 22:26:12 CDT 2015


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1433300286 25200
#      Tue Jun 02 19:58:06 2015 -0700
# Node ID a0a8ceb536058a1647d8282f75d2ca82617d68c8
# Parent  724d7982b7906775b024c04875c0c064342d186e
changegroup: rename _computeoutgoing to computeoutgoing

We're going to use this function from another module in an upcoming
patch. Drop the _ prefix to mark it as non-private.

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -614,9 +614,9 @@ def getlocalchangegroup(repo, source, ou
         return None
     bundler = cg1packer(repo, bundlecaps)
     return getsubset(repo, outgoing, bundler, source)
 
-def _computeoutgoing(repo, heads, common):
+def computeoutgoing(repo, heads, common):
     """Computes which revs are outgoing given a set of common
     and a set of heads.
 
     This is a separate function so extensions can have access to
@@ -645,9 +645,9 @@ def getchangegroupraw(repo, source, head
 
     The nodes in common might not all be known locally due to the way the
     current discovery protocol works. Returns a raw changegroup generator.
     """
-    outgoing = _computeoutgoing(repo, heads, common)
+    outgoing = computeoutgoing(repo, heads, common)
     return getlocalchangegroupraw(repo, source, outgoing, bundlecaps=bundlecaps,
                                   version=version)
 
 def getchangegroup(repo, source, heads=None, common=None, bundlecaps=None):
@@ -658,9 +658,9 @@ def getchangegroup(repo, source, heads=N
 
     The nodes in common might not all be known locally due to the way the
     current discovery protocol works.
     """
-    outgoing = _computeoutgoing(repo, heads, common)
+    outgoing = computeoutgoing(repo, heads, common)
     return getlocalchangegroup(repo, source, outgoing, bundlecaps=bundlecaps)
 
 def changegroup(repo, basenodes, source):
     # to avoid a race we use changegroupsubset() (issue1320)


More information about the Mercurial-devel mailing list