sapling/lib
Jun Wu c32c89ffa4 drawdag: implement a Rust drawdag library
Summary:
This library parses an ASCII DAG. It is similar to mercurial/drawdag.py, which
was added by me in [1].

There are some (intentional) differences from the Python drawdag:

- Stricter. Confusing DAG characters like `+` or crossing lines are forbidden.
- Do not special handle `o` as a name.
- Do not try to be compatible with `hg log -G` output.
- Do not support special comments (yet).
- Support both left to right and bottom to top directions.

This library tries to be abstract. i.e. it does not have actual logic about
how to make a commit. Its intended users are Mononoke and scmdag, which have
different ways to make commits.

Since this is a library that is intended to be used only for tests. I didn't spend too
much effort to optimize its performance.

[1]: https://www.mercurial-scm.org/repo/hg/rev/a31634336471

Reviewed By: kulshrax

Differential Revision: D15039768

fbshipit-source-id: 4c33d44759ecf59aadc3d443a84db07d702dc69b
2019-05-03 13:35:40 -07:00
..
argparse codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
asyncrevisionstore/src asyncrevisionstore: rename asynpacks to asyncrevisionstore 2019-04-24 10:58:54 -07:00
bookmarkstore indexedlog: use failure for error handling 2019-04-05 12:17:28 -07:00
cdatapack fix double free in cdatapack 2019-04-03 21:13:13 -07:00
clib Started Eden for Windows and integrated hg store with it. 2018-08-21 17:51:26 -07:00
commitcloudsubscriber commitcloudsubscriber: updates tests.rs 2019-03-20 19:56:14 -07:00
configparser configparse: use .as_span instead of .into_span 2019-04-26 12:37:08 -07: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
dag dag: implement basic operations 2019-05-03 13:35:40 -07:00
drawdag drawdag: implement a Rust drawdag library 2019-05-03 13:35:40 -07:00
edenapi edenapi: improve progress reporting 2019-05-02 14:20:55 -07: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: expose range API on Log 2019-04-18 13:35:46 -07: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
manifest manifest: migrate to types::testutil node 2019-04-08 16:21:08 -07: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 indexedlog: make IndexDef clone-able 2019-03-30 08:59:13 -07:00
nodemap indexedlog: add OpenOptions::index 2019-04-01 17:16:17 -07:00
pathmatcher pathmatcher: migrate to rust 2018 and tempfile 2019-04-26 17:45:27 -07:00
radixbuf radixbuf: replace error-chain with failure 2019-04-29 15:36:02 -07:00
revisionstore revisionstore: use replace instead of direct drop 2019-04-25 18:53:06 -07:00
third-party xdiff: backport upstream changes 2018-04-13 21:51:48 -07:00
treestate hg: fix test-check-fix-code.t 2019-04-29 08:05:56 -07:00
types edenapi: use DataEntry 2019-04-16 22:13:41 -07: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: fix windows build 2019-02-22 10:22:30 -08:00
zstdelta Update to zstd-1.4.x 2019-04-23 22:41:55 -07:00
Cargo.toml drawdag: implement a Rust drawdag library 2019-05-03 13:35:40 -07: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).