changeset 32168:4e6aab69a98b

changegroup: deprecate 'getlocalchangroup' (API) We have 'getchangegroup' with a shorter name for the exactly same feature. Now that all users are gone we can formally deprecate it.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 04 May 2017 12:43:41 +0200
parents d62626233aa2
children aeb060dd7ac9
files mercurial/changegroup.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/changegroup.py	Thu May 04 12:41:50 2017 +0200
+++ b/mercurial/changegroup.py	Thu May 04 12:43:41 2017 +0200
@@ -976,8 +976,10 @@
     bundler = getbundler(version, repo)
     return getsubset(repo, outgoing, bundler, source)
 
-# deprecate me once all users are gone
-getlocalchangegroup = getchangegroup
+def getlocalchangegroup(repo, *args, **kwargs):
+    repo.ui.deprecwarn('getlocalchangegroup is deprecated, use getchangegroup',
+                       '4.3')
+    return getchangegroup(repo, *args, **kwargs)
 
 def changegroup(repo, basenodes, source):
     # to avoid a race we use changegroupsubset() (issue1320)