comparison mercurial/utils/urlutil.py @ 47410:65333ecc8b34

urlutil: use the deprecation warning function on the `ui` object PyCharm flagged this as not existing, and I suspect a copy/paste error. Differential Revision: https://phab.mercurial-scm.org/D10871
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 11 Jun 2021 23:50:29 -0400
parents 9cc9b4a25248
children 515014d72aa2
comparison
equal deleted inserted replaced
47409:0ef8231e413f 47410:65333ecc8b34
682 682
683 Returns None if ``name`` is not a registered path, a URI, or a local 683 Returns None if ``name`` is not a registered path, a URI, or a local
684 path to a repo. 684 path to a repo.
685 """ 685 """
686 msg = b'getpath is deprecated, use `get_*` functions from urlutil' 686 msg = b'getpath is deprecated, use `get_*` functions from urlutil'
687 self.deprecwarn(msg, '6.0') 687 ui.deprecwarn(msg, '6.0')
688 # Only fall back to default if no path was requested. 688 # Only fall back to default if no path was requested.
689 if name is None: 689 if name is None:
690 if not default: 690 if not default:
691 default = () 691 default = ()
692 elif not isinstance(default, (tuple, list)): 692 elif not isinstance(default, (tuple, list)):