mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
A Scalable, User-Friendly Source Control System.
a4129f8d53
Summary: [pest](https://github.com/pest-parser/pest) is an elegant Rust library for parsing text. A navie benchmark on a 1MB config file shows pest is about 1.5 to 2x slower. But the better error message and cleaner code seems worth it. Practically, in a VirtualBox VM, parsing a set of our config files takes 3-7ms. The overhead seems to be opening too many files. Reducing it to one file makes parsing complete in 2-4ms. Unfortunately the buck build has issues with the elegant syntax `#[grammar = "spec.pest"]`, because "spec.pest" cannot be located by pest_derive. Therefore a workaround is used to generate the parser. The motivation behind this is because I noticed multi-line value can not be taken as a plain Bytes slice. For example: [section] foo = line1 line2 "foo" should be "line1\nline2", instead of "line1\n line2". It does not make a difference on configlist. But it affects templates. Rather than making the parser more complex, it seems better to just adopt a reasonbly fast parsing library. Reviewed By: DurhamG Differential Revision: D8960876 fbshipit-source-id: 2fa04e38b706f7126008512732c9efa168f84cc7 |
||
---|---|---|
contrib | ||
distutils_rust | ||
doc | ||
exec/scm_daemon | ||
hgdemandimport | ||
hgext | ||
hgext3rd | ||
i18n | ||
lib | ||
mercurial | ||
tests | ||
.editorconfig | ||
.flake8 | ||
.gitignore | ||
.hgsigs | ||
.jshintrc | ||
.watchmanconfig | ||
CONTRIBUTING | ||
CONTRIBUTORS | ||
COPYING | ||
gen_version.py | ||
hg | ||
hgeditor | ||
hgweb.cgi | ||
Makefile | ||
README.rst | ||
setup.py |
Mercurial ========= Mercurial is a fast, easy to use, distributed revision control tool for software developers. Basic install:: $ make # see install targets $ make install # do a system-wide install $ hg debuginstall # sanity-check setup $ hg # see help Running without installing:: $ make local # build for inplace usage $ ./hg --version # should show the latest version See https://mercurial-scm.org/ for detailed installation instructions, platform-specific notes, and Mercurial user information.