mirror of
https://github.com/facebook/sapling.git
synced 2025-01-08 14:46:47 +03:00
7b96c8d292
Summary: Alias starting with `!` are considered shell commands. The entire command string should be passed roughly as-is to the shell. The current alias handling uses shlex::split to split the alias into arguments, then replaces things like `$1` in arguments. The problem is, escaping shlex::split a complex shell alias, then unesape (shlex::quote) it is not loseless. To maintain compatibility for existing complex shell alias configuration, add a new code path that imitates the Python code behavior. Reviewed By: sfilipco Differential Revision: D16814144 fbshipit-source-id: 0e5e95f99bf8b8b16bd8d0cbcadd6760f7f77ebb |
||
---|---|---|
.. | ||
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).