[PATCH 08 of 10] scmutil: remove rcpath
Jun Wu
quark at fb.com
Mon Mar 13 23:44:53 EDT 2017
# HG changeset patch
# User Jun Wu <quark at fb.com>
# Date 1489455385 25200
# Mon Mar 13 18:36:25 2017 -0700
# Node ID a0cff9968a6041c3c47a8417637c79959f9ba408
# Parent d640c97a1c2b7098581753814ec8e3c72ce53dfd
# Available At https://bitbucket.org/quark-zju/hg-draft
# hg pull https://bitbucket.org/quark-zju/hg-draft -r a0cff9968a60
scmutil: remove rcpath
It's no longer used.
diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -427,31 +427,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:
- syspath, userpath = osrcpath()
- _rcpath = syspath + userpath
- return _rcpath
-
_rccomponents = None
More information about the Mercurial-devel
mailing list