##// END OF EJS Templates
rust-status: query fs traversal metadata lazily...
rust-status: query fs traversal metadata lazily Currently, any time the status algorithm needs to read a directory from the filesystem (because the stat-only optimization is not available), it also stats each directory entry eagerly. Stat'ing the entries is only needed in a few cases (like when checking the mtime of a directory for caching): this patch creates a wrapper struct `DirEntry` that only stats the directory entry it represents when needed. Excerpt of an `strace` before this change on Mozilla Central: ``` openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3 newfstatat(3, "", {st_mode=S_IFDIR|0755, st_size=3540, ...}, AT_EMPTY_PATH) = 0 getdents64(3, 0x55dc970bd440 /* 139 entries */, 32768) = 5072 statx(3, ".hg", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|0755, stx_size=772, ...}) = 0 [... 135 other successful `statx` calls] getdents64(3, 0x55dc970bd440 /* 0 entries */, 32768) = 0 close(3) = 0 ``` After this change: ``` openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3 newfstatat(3, "", {st_mode=S_IFDIR|0755, st_size=3540, ...}, AT_EMPTY_PATH) = 0 getdents64(3, 0x561567c10190 /* 139 entries */, 32768) = 5072 getdents64(3, 0x561567c10190 /* 0 entries */, 32768) = 0 close(3) = 0 ```
Raphaël Gomès -
r50459:da48f170 default
Show More
Name Size Modified Last Commit Author
.gitlab
contrib
doc
hgdemandimport
hgext
hgext3rd
i18n
mercurial
relnotes
rust
tests
.arcconfig Loading ...
.clang-format Loading ...
.editorconfig Loading ...
.hgignore Loading ...
.hgsigs Loading ...
.hgtags Loading ...
.jshintrc Loading ...
CONTRIBUTING Loading ...
CONTRIBUTORS Loading ...
COPYING Loading ...
Makefile Loading ...
README.rst Loading ...
hg Loading ...
hgeditor Loading ...
hgweb.cgi Loading ...
pyproject.toml Loading ...
rustfmt.toml Loading ...
setup.py Loading ...

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.

Notes for packagers

Mercurial ships a copy of the python-zstandard sources. This is used to provide support for zstd compression and decompression functionality. The module is not intended to be replaced by the plain python-zstandard nor is it intended to use a system zstd library. Patches can result in hard to diagnose errors and are explicitly discouraged as unsupported configuration.