rcutil: extract rc directory listing logic
The logic of listing a ".rc" directory is duplicated in two functions,
extract it to a single function to make the code cleaner.
rcutil: split osrcpath to return default.d paths (API)
After this change, there are 3 rcpath functions:
- defaultrcpath
- systemrcpath
- userrcpath
This will allow us to insert another config layer in the middle.
rcutil: move scmutil.*rcpath to rcutil (API)
As discussed at [1], the logic around "actual config"s seem to be
non-trivial enough that it's worth a new module.
This patch creates the module and move "scmutil.*rcpath" functions there as
the first step. More methods will be moved to the module in the future.
The module is different from config.py because the latter only cares about
data structure and parsing, and does not care about special case, or system
config paths, or environment variables.
[1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-March/095503.html
statfs: make getfstype() raise OSError
It's better for getfstype() function to not suppress an error. Callers can
handle it as necessary. Now "hg debugfsinfo" will report OSError.
statfs: refactor inner function as a mapping from statfs to string
The major difference between BSD and Linux is how to get a fstype string.
Let's split the longest part of getfstype() as a pure function.
statfs: simplify handling of return value
Py_BuildValue() can translate NULL pointer to None.
runtests: change local IP glob pattern from "127.0.0.1" to "$LOCALIP"
This is similar to what
348b2b9da703 does. Since
636cf3f7620d has changed
"127.0.0.1" to "$LOCALIP". The glob pattern needs update accordingly. It is
expected to fix tests running in some BSD jails.
tags: deprecated 'repo.tag'
All user are gone. We can now celebrate the removal of some extra line from the
'localrepo' class.