D11950: urls: remove deprecated APIs

Alphare (Raphaël Gomès) phabricator at mercurial-scm.org
Thu Dec 23 21:13:01 UTC 2021


Alphare created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11950

AFFECTED FILES
  mercurial/hg.py
  mercurial/util.py

CHANGE DETAILS

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -57,7 +57,6 @@
     hashutil,
     procutil,
     stringutil,
-    urlutil,
 )
 
 if pycompat.TYPE_CHECKING:
@@ -2991,54 +2990,6 @@
     return r.sub(lambda x: fn(mapping[x.group()[1:]]), s)
 
 
-def getport(*args, **kwargs):
-    msg = b'getport(...) moved to mercurial.utils.urlutil'
-    nouideprecwarn(msg, b'6.0', stacklevel=2)
-    return urlutil.getport(*args, **kwargs)
-
-
-def url(*args, **kwargs):
-    msg = b'url(...) moved to mercurial.utils.urlutil'
-    nouideprecwarn(msg, b'6.0', stacklevel=2)
-    return urlutil.url(*args, **kwargs)
-
-
-def hasscheme(*args, **kwargs):
-    msg = b'hasscheme(...) moved to mercurial.utils.urlutil'
-    nouideprecwarn(msg, b'6.0', stacklevel=2)
-    return urlutil.hasscheme(*args, **kwargs)
-
-
-def hasdriveletter(*args, **kwargs):
-    msg = b'hasdriveletter(...) moved to mercurial.utils.urlutil'
-    nouideprecwarn(msg, b'6.0', stacklevel=2)
-    return urlutil.hasdriveletter(*args, **kwargs)
-
-
-def urllocalpath(*args, **kwargs):
-    msg = b'urllocalpath(...) moved to mercurial.utils.urlutil'
-    nouideprecwarn(msg, b'6.0', stacklevel=2)
-    return urlutil.urllocalpath(*args, **kwargs)
-
-
-def checksafessh(*args, **kwargs):
-    msg = b'checksafessh(...) moved to mercurial.utils.urlutil'
-    nouideprecwarn(msg, b'6.0', stacklevel=2)
-    return urlutil.checksafessh(*args, **kwargs)
-
-
-def hidepassword(*args, **kwargs):
-    msg = b'hidepassword(...) moved to mercurial.utils.urlutil'
-    nouideprecwarn(msg, b'6.0', stacklevel=2)
-    return urlutil.hidepassword(*args, **kwargs)
-
-
-def removeauth(*args, **kwargs):
-    msg = b'removeauth(...) moved to mercurial.utils.urlutil'
-    nouideprecwarn(msg, b'6.0', stacklevel=2)
-    return urlutil.removeauth(*args, **kwargs)
-
-
 timecount = unitcountfn(
     (1, 1e3, _(b'%.0f s')),
     (100, 1, _(b'%.1f s')),
diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -130,13 +130,6 @@
     return revs, revs[0]
 
 
-def parseurl(path, branches=None):
-    '''parse url#branch, returning (url, (branch, branches))'''
-    msg = b'parseurl(...) moved to mercurial.utils.urlutil'
-    util.nouideprecwarn(msg, b'6.0', stacklevel=2)
-    return urlutil.parseurl(path, branches=branches)
-
-
 schemes = {
     b'bundle': bundlerepo,
     b'union': unionrepo,



To: Alphare, #hg-reviewers
Cc: mercurial-patches, mercurial-devel


More information about the Mercurial-devel mailing list