mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
64c981f938
Summary: The `HgId` implements a lot of convenient features. Alias it to Id20 so we can use it for other 20-byte stuff, like a non-hg SHA1 binary hash. In the future we might want to make `HgId` and `Id20` incompatible types. For example, define `struct HgId(Id20)`, and define deref, and handy constructors. But that requires larger code change. The name `Id20` is Stefan Filip's idea. Reviewed By: sfilipco Differential Revision: D18265059 fbshipit-source-id: 4f505c1d38d25b405f7588d76a7752c32c62f8be |
||
---|---|---|
.. | ||
asyncrevisionstore/src | ||
auth | ||
backingstore | ||
blackbox | ||
bookmarkstore | ||
cdatapack | ||
clib | ||
clidispatch | ||
cliparser | ||
commitcloudsubscriber | ||
commitstore/bench-serialize | ||
configparser | ||
cpython-ext | ||
cpython-failure | ||
dag | ||
drawdag | ||
edenapi | ||
encoding | ||
hg_watchman_client | ||
hgcommands | ||
hgtime | ||
indexedlog | ||
linelog | ||
lz4-pyframe | ||
manifest | ||
mincode | ||
minibench | ||
mpatch | ||
mpatch-sys | ||
mutationstore | ||
nodemap | ||
pathmatcher | ||
procinfo | ||
radixbuf | ||
revisionstore | ||
stackdesc | ||
third-party | ||
tracing-collector | ||
treestate | ||
types | ||
util | ||
vlqencoding | ||
watchman_client | ||
workingcopy | ||
xdiff | ||
xdiff-sys | ||
zstdelta | ||
CMakeLists.txt | ||
README.md |
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).