changegroup: deprecate 'getlocalchangroup' (API)
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 04 May 2017 12:43:41 +0200
changeset 32168 4e6aab69a98b
parent 32167 d62626233aa2
child 32169 aeb060dd7ac9
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.
mercurial/changegroup.py
--- 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)