# HG changeset patch # User Jun Wu <qu...@fb.com> # Date 1489455385 25200 # Mon Mar 13 18:36:25 2017 -0700 # Node ID 486b23fa9d4e82b3d01aad8663895b5448f54d88 # Parent fa6d527d03e29efc75591e1721ddcbd6b72e4a76 # Available At https://bitbucket.org/quark-zju/hg-draft # hg pull https://bitbucket.org/quark-zju/hg-draft -r 486b23fa9d4e scmutil: remove rcpath (API)
It's no longer used. Third-party code using it should consider using "rccomponents" instead. diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -423,31 +423,4 @@ def envconfig(envlist, env=None): return result -_rcpath = None - -def rcpath(): - '''return hgrc search path. if env var HGRCPATH is set, use it. - for each item in path, if directory, use files ending in .rc, - else use item. - make HGRCPATH empty to only look in .hg/hgrc of current repo. - if no HGRCPATH, use default os-specific path.''' - global _rcpath - if _rcpath is None: - if 'HGRCPATH' in encoding.environ: - _rcpath = [] - for p in encoding.environ['HGRCPATH'].split(pycompat.ospathsep): - if not p: - continue - p = util.expandpath(p) - if os.path.isdir(p): - for f, kind in osutil.listdir(p): - if f.endswith('.rc'): - _rcpath.append(os.path.join(p, f)) - else: - _rcpath.append(p) - else: - paths = defaultrcpath() + systemrcpath() + userrcpath() - _rcpath = map(os.path.normpath, paths) - return _rcpath - _rccomponents = None _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel