Mercurial > hg
comparison mercurial/scmutil.py @ 30305:af7c60988f6e
py3: make scmutil.rcpath() return bytes
This patch make sure scmutil.rcpath() returns bytes independent of
which platform is used on Python 3. If we want to change type for windows we
can just conditionalize the return variable.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sun, 06 Nov 2016 04:17:19 +0530 |
parents | 96a2278ee732 |
children | 4b1af1c867fa |
comparison
equal
deleted
inserted
replaced
30304:ba2c04059317 | 30305:af7c60988f6e |
---|---|
25 error, | 25 error, |
26 match as matchmod, | 26 match as matchmod, |
27 osutil, | 27 osutil, |
28 pathutil, | 28 pathutil, |
29 phases, | 29 phases, |
30 pycompat, | |
30 revset, | 31 revset, |
31 similar, | 32 similar, |
32 util, | 33 util, |
33 ) | 34 ) |
34 | 35 |
753 if no HGRCPATH, use default os-specific path.''' | 754 if no HGRCPATH, use default os-specific path.''' |
754 global _rcpath | 755 global _rcpath |
755 if _rcpath is None: | 756 if _rcpath is None: |
756 if 'HGRCPATH' in encoding.environ: | 757 if 'HGRCPATH' in encoding.environ: |
757 _rcpath = [] | 758 _rcpath = [] |
758 for p in os.environ['HGRCPATH'].split(os.pathsep): | 759 for p in encoding.environ['HGRCPATH'].split(pycompat.ospathsep): |
759 if not p: | 760 if not p: |
760 continue | 761 continue |
761 p = util.expandpath(p) | 762 p = util.expandpath(p) |
762 if os.path.isdir(p): | 763 if os.path.isdir(p): |
763 for f, kind in osutil.listdir(p): | 764 for f, kind in osutil.listdir(p): |