sapling/eden/scm/lib
Andrey Chursin e1ce22be1e async-runtime: introduce (try_)block_unless_interrupted
Summary: This method should be preferred to use from python binding. It is similar to block_on but allow to interrupt future on Ctrl+C

Reviewed By: quark-zju

Differential Revision: D26894586

fbshipit-source-id: 02d8fbb2f9c4d9e585f8fbee51bfc400c402d0d2
2021-03-12 09:04:04 -08:00
..
async-runtime async-runtime: introduce (try_)block_unless_interrupted 2021-03-12 09:04:04 -08:00
auth autocargo v1: changes to match autocargo v2 generation results. 2021-02-19 11:03:55 -08:00
backingstore eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
blackbox eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
bookmarkstore eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
checkout checkout: switch to Bytes::to_vec since it is fixed now 2021-03-12 09:04:04 -08:00
clib Apply clang-format update fixes 2021-01-10 10:06:29 -08:00
clidispatch clidispatch: pass repo path to config contructor in from_raw_path 2021-03-08 13:31:10 -08:00
cliparser third-party/rust: update tokio & tokio-stream 2021-03-10 11:01:28 -08:00
commitcloudsubscriber eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
configparser dynamicconfigs: rename config path location to config_dir 2021-03-11 10:13:37 -08:00
cpython-async third-party/rust: update tokio & tokio-stream 2021-03-10 11:01:28 -08:00
cpython-ext eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
dag third-party/rust: update tokio & tokio-stream 2021-03-10 11:01:28 -08:00
dev-logger eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
drawdag autocargo v1: changes to match autocargo v2 generation results. 2021-02-19 11:03:55 -08:00
edenapi edenapi: add more context to errors 2021-03-11 11:33:59 -08:00
edenfs-client eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
encoding eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
fsinfo eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
fsyncglob eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
hg-http hg-http: add API to integrate with progress/model 2021-03-11 17:19:14 -08:00
hg-metrics eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
hgcommands fsync: add allheads and lfs to fsync list 2021-03-10 11:06:10 -08:00
hgcommits vfs: introduce AsyncVfs 2021-03-05 21:47:51 -08:00
hgtime eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
http-client http-client: add a callback for all requests 2021-03-11 17:19:14 -08:00
indexedlog eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
io io: provide a way to set progress without IO reference 2021-03-10 19:37:00 -08:00
linelog Apply clang-format update fixes 2021-01-10 10:06:29 -08:00
lz4-pyframe autocargo v1: changes to match autocargo v2 generation results. 2021-02-19 11:03:55 -08:00
manifest eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
manifest-tree eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
metalog eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
mincode eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
minibench autocargo v1: changes to match autocargo v2 generation results. 2021-02-19 11:03:55 -08:00
minibytes minibytes: into_vec cannot use fast path if the vec is sliced 2021-03-10 17:16:53 -08:00
mpatch eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
mpatch-sys eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
mutationstore eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
nodemap eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
nonblocking third-party/rust: update futures 2021-03-04 06:42:55 -08:00
pathmatcher eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
procinfo eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
progress progress: add a sub-crate for rendering progress 2021-03-11 17:19:14 -08:00
radixbuf eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
renderdag eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
revisionstore third-party/rust: update tokio & tokio-stream 2021-03-10 11:01:28 -08:00
revlogindex vfs: introduce AsyncVfs 2021-03-05 21:47:51 -08:00
spawn-ext eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
streams third-party/rust: update tokio & tokio-stream 2021-03-10 11:01:28 -08:00
taggederror eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
taggederror-util eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
third-party mman-win32: remove 2020-10-02 10:47:24 -07:00
thrift-types eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
tracing-analyzer autocargo v1: changes to how thrift-related generation is done to match v2 2021-02-23 11:38:45 -08:00
tracing-collector eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
tracing-runtime-callsite autocargo v1: changes to match autocargo v2 generation results. 2021-02-19 11:03:55 -08:00
treestate eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
types types: update HgId to use "bytes" serialization by default 2021-02-24 09:20:35 -08:00
util eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
version configparser: fix non-fb dependencies (#45) 2020-08-26 16:31:00 -07:00
vfs vfs: add a few Debug derives 2021-03-11 10:07:04 -08:00
vlqencoding autocargo v1: changes to match autocargo v2 generation results. 2021-02-19 11:03:55 -08:00
workingcopy eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
xdiff autocargo v2: rollout and replace v1 in all use-cases 2021-03-02 06:43:29 -08:00
xdiff-sys autocargo v2: rollout and replace v1 in all use-cases 2021-03-02 06:43:29 -08:00
zstdelta eden/scm/lib: autogenerate all Cargo.toml files with autocargo 2021-03-05 04:29:49 -08:00
zstore autocargo v1: changes to how thrift-related generation is done to match v2 2021-02-23 11:38:45 -08:00
CMakeLists.txt clib: remove buffer.[ch] 2020-10-02 10:47:23 -07:00
README.md Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
run_cargo_tests.py config: use Rust graph render as default 2020-10-19 17:07:30 -07: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).