sapling/lib
Jun Wu 9cdc2640d6 config: change system config entry point
Summary:
Change system config entry point to only `/etc/mercurial/system.rc` (unix) and
`\ProgramData\Facebook\Mercurial\system.rc` (Windows) so they won't overlap
with a vanilla Mercurial installation.

Another goal of this change is to make it easier to drop the directory
`%include` feature. So detecting config changes (for example, edenfs wants to
make sure ignore rules are up-to-date) can be made cheaper by just stating
files without `listdir`.

Reviewed By: markbt

Differential Revision: D13875656

fbshipit-source-id: 314c0bf87ff086dec5b88e232edca0133356484e
2019-02-08 19:31:11 -08:00
..
argparse codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
asyncpacks/src asyncpacks: add AsyncUnionHistoryStore 2019-02-08 12:56:06 -08:00
bookmarkstore bookmark: Turn BookmarkStore into indexed-log backed 2018-11-28 10:21:26 -08:00
cdatapack hg: disable check-code tests for C code 2018-06-05 19:21:43 -07:00
clib Started Eden for Windows and integrated hg store with it. 2018-08-21 17:51:26 -07:00
commitcloudsubscriber commitcloudsubscriber: use Fallible 2019-01-15 03:50:47 -08:00
configparser config: change system config entry point 2019-02-08 19:31:11 -08:00
cpython-ext revisionstore: use Bytes instead of Box<[u8]> in Delta and DataEntry 2019-01-22 14:03:17 -08:00
cpython-failure cpython-failure: Integrate cpython PyResult with the failure crate 2018-12-14 06:43:40 -08:00
edenapi edenapi: enforce HTTP/2 prior knowledge 2019-02-05 21:22:48 -08:00
encoding encoding: use Cow for returned types that may be references 2018-10-30 04:07:02 -07:00
hg_watchman_client watchman_client: use Fallible 2019-01-15 03:50:47 -08:00
hgpython codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00
indexedlog indexedlog: add methods on Log to do prefix lookups 2018-12-20 15:50:55 -08:00
linelog linelog: update README 2018-11-08 12:34:36 -08:00
lz4-pyframe revisionstore: use Bytes instead of Box<[u8]> in Delta and DataEntry 2019-01-22 14:03:17 -08:00
minibench indexedlog: add more benchmarks 2018-12-06 14:57:52 -08:00
mpatch codemod: use explicit versions in Cargo.toml 2018-11-15 18:54:06 -08:00
mpatch-sys codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00
mutationstore types: use Fallible 2019-01-15 03:50:47 -08:00
nodemap types: use Fallible 2019-01-15 03:50:47 -08:00
pathmatcher codemod: use explicit versions in Cargo.toml 2018-11-15 18:54:06 -08:00
radixbuf codemod: add copyright headers 2018-10-26 15:09:12 -07:00
revisionstore memcache: implement get_hist 2019-02-08 12:56:06 -08:00
third-party xdiff: backport upstream changes 2018-04-13 21:51:48 -07:00
treestate Update itertools version in lib/treestate 2019-02-08 11:49:54 -08:00
types types: derive Serialize and Deserialize for Node 2019-01-29 04:44:15 -08:00
url-ext url-ext: add url-ext crate 2019-01-30 18:30:49 -08:00
vlqencoding vlqencoding: don't require Sized for Read or Write traits 2018-10-29 04:10:46 -07:00
watchman_client watchman_client: use Fallible 2019-01-15 03:50:47 -08:00
zstdelta Revert D13575719: [tp2] Update zstd to 1.3.8 as 1.3.x 2019-01-23 18:19:13 -08:00
Cargo.toml Remove argparse from the lib cargo workspace 2019-02-06 16:42:23 -08:00
README.md READMEs: tweaks based on feedback 2018-01-12 12:35:52 -08:00

lib

Any native code (C/C++/Rust) that Mercurial (either core or extensions) depends on should go here. Python code, or native code that depends on Python code (e.g. #include <Python.h> or use cpython) is disallowed.

As we start to convert more of Mercurial into Rust, and write new paths entrirely in native code, we'll want to limit our dependency on Python, which is why this barrier exists.

See also hgext/extlib/README.md, mercurial/cext/README.mb.

How do I choose between lib and extlib (and cext)?

If your code is native and doesn't depend on Python (awesome!), it goes here.

Otherwise, put it in hgext/extlib (if it's only used by extensions) or mercurial/cext (if it's used by extensions or core).