mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 01:39:21 +03:00
0099d73ea1
Summary: The existing hg APIs support things like getting all the gcas, and testing "isancestor" without calcuating the gca. Implement them in the dag crate to match those features. I picked `gca` to make names shorter. Here is a list of how those features get named in two codebases: Name in hg codebase | Name in this crate ----------------------------------------- ancestor | gca_one commonancestorsheads | gca_all isancestor | is_ancestor ancestors | ancestors Reviewed By: markbt, sfilipco Differential Revision: D16672420 fbshipit-source-id: d205d7970623e992e656ae300218239cddbd26c8 |
||
---|---|---|
.. | ||
asyncrevisionstore/src | ||
blackbox | ||
bookmarkstore | ||
cdatapack | ||
clib | ||
clidispatch | ||
cliparser | ||
commitcloudsubscriber | ||
configparser | ||
cpython-ext | ||
cpython-failure | ||
dag | ||
drawdag | ||
edenapi | ||
encoding | ||
hg_watchman_client | ||
hgcommands | ||
indexedlog | ||
linelog | ||
lz4-pyframe | ||
manifest | ||
minibench | ||
mpatch | ||
mpatch-sys | ||
mutationstore | ||
nodemap | ||
pathmatcher | ||
procinfo | ||
radixbuf | ||
revisionstore | ||
stackdesc | ||
third-party | ||
treestate | ||
types | ||
vlqencoding | ||
watchman_client | ||
zstdelta | ||
Cargo.toml | ||
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).