- Nov 14, 2022
-
-
Raphaël Gomès authored
-
- Nov 10, 2022
-
-
Raphaël Gomès authored
Explanations inline.
-
- Oct 19, 2022
-
-
Raphaël Gomès authored
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 authored
-
- Nov 03, 2022
-
-
Raphaël Gomès authored
Ellipsis revisions are still experimental and buggy in non-trivial histories. We currently have no plans to improve this situation nor to add support for ellipsis revisions in `rhg`. Falling back should be done carefully (since we may have already done some work that is visible to the user), but in this case it's highly unlikely that we're doing anything useful with a repo with ellipsis revisions, so this should be strictly better, also since the error message is more explicit.
-
- Nov 02, 2022
-
-
Raphaël Gomès authored
Fixes the test introduced in the last changeset. This caused the hash to change, which means that the check in the test had to be adapted. Since this hash is only done as a caching mechanism, invalidation does not pose any backwards compatibility issues.
-
- Oct 19, 2022
-
-
Raphaël Gomès authored
There was a functional race between invalidating the cache (not acted upon until the end of the status algorithm) and populating the new cache (which relies upon an up-to-date version of the cache). We simply inform the cache populating function that we've just invalidated the cache for this particular directory since the information is present in the same scope.
-
Raphaël Gomès authored
-
- Oct 10, 2022
-
-
Arseniy Alekseyev authored
By making the computation of [has_ignored_ancestor] lazy we're eliding its computation in the common case when none of its descendants have changed on disk. On a ~400k files repo, with a cached status, we saw a ~64% reduction in CPU time, resulting in a speedup of ~10-15% (on ZFS), and a speedup of ~38% of XFS (XFS has faster stat operations for some reason).
-
- Oct 05, 2022
-
-
Arseniy Alekseyev authored
[unsure_is_modified] is called for every file for which we can't determine its status based on its size and mtime alone. In particular, this happens if the mtime of the file changes without its contents changing. Parallellizing this improves performance significantly when we have many of these files. Here's an example run (on a repo with ~400k files after dropping FS caches) ``` before: real 0m53.901s user 0m27.806s sys 0m31.325s after: real 0m32.017s user 0m34.277s sys 1m26.250s ``` Another example run (a different FS): ``` before: real 3m28.479s user 0m31.800s sys 0m25.324s after: real 0m29.751s user 0m41.814s sys 1m15.387s ```
-
- Sep 20, 2022
-
-
Arseniy Alekseyev authored
-
- Sep 22, 2022
-
-
Arseniy Alekseyev authored
-
- Sep 20, 2022
-
-
Arseniy Alekseyev authored
-
- Sep 22, 2022
-
-
Arseniy Alekseyev authored
This makes two changes: - make rhg support the [dirstate-tracked-key-v1] requirement. I believe rhg never changes the tracked file set, so it's OK that it doesn't have any logic for writing this file. - fix the name of [format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories] config option in rhg, which makes rhg actually honor the auto-upgrade. These two issues cancelled each other out in tests (auto-upgrade was happening because [dirstate-tracked-key-v1] forced the fallback, not because of the config), which is I think why they went unnoticed earlier.
-
- Jul 25, 2022
-
-
Raphaël Gomès authored
-
- Jul 19, 2022
-
-
Raphaël Gomès authored
This will be used by the narrow support code in the next commit.
-
- Jul 11, 2022
-
-
Raphaël Gomès authored
This makes sure we can easily debug which Matcher we're looking at when using trait objects, and is just generally useful. Effort to make the debugging output nicer has been kept to a minimum, please feel free to improve.
-
- Jul 19, 2022
-
-
Raphaël Gomès authored
-
- Jul 18, 2022
-
-
Raphaël Gomès authored
This will be used when parsing pattern files other than .hgignore like the sparse spec.
-
- Jul 06, 2022
-
-
Raphaël Gomès authored
This can be generated by the sparse matcher.
-
- Aug 29, 2022
-
-
Raphaël Gomès authored
This change adds a test for this fix as well as an additional test case that was useful in debugging this behavior.
-
- Aug 24, 2022
-
-
Arseniy Alekseyev authored
Add support for verbose [status] when no extra output is actually needed. This makes it so that [rhg status] is actually useful when [tweakdefaults] is true. (since tweakdefaults implies verbose status)
-
- Aug 17, 2022
-
-
Raphaël Gomès authored
This fixes the behavior of `hg purge` removing empty ignored directory even without `--all` or `--ignored`.
-
- Jul 11, 2022
-
-
kiilerix authored
The merge in 12adf8c695ed had conflicts in rust/Cargo.lock and rust/hg-core/Cargo.toml . Let's ignore rust/Cargo.lock - it is regenerated. For rust/hg-core/Cargo.toml, stable had dd6b67d5c256 "rust: fix unsound `OwningDirstateMap`" which introduced ouroboros (and dropped stable_deref_trait). Default had ec8d9b5a5e7c "rust-hg-core: upgrade dependencies" which had a lot of churn bumping minimum versions - also patch versions. It is indeed a good idea to bump to *allow* use of latest package. That means that major versions should be bumped for packages after 1.0, and for packages below 1.0 minor versions should be bumped too. But it doesn't work to try enforce a policy of using latest patch by bumping versions at arbitrary times. For good or bad, the merge doesn't seem to have resolved the conflicts correctly, and many of the minor "upgrade dependencies" were lost again. Unfortunately, it also lost the bump of memmap2 to 0.5.3, which is needed for Fedora packaging where 0.4 isn't available. Same with micro-timer bump to 0.4 (which already is used in rhg). crossbeam-channel bump was also lost. This change fixes that regression by redoing these "important" lines of the merge "correctly". I propose this for stable, even though dependency changes on stable branches are annoying.
-
- May 25, 2022
-
-
Raphaël Gomès authored
This makes trace output *really* noisy and is only useful in case you want to take a look at a single revlog. This is easy to add back on a case-by-case basis and does not need to stay with the more permanent timers.
-
- May 18, 2022
-
-
Raphaël Gomès authored
This helps when diagnosing corruption, and is in general good practice. The information is here, valuable and can be used easily.
-
Raphaël Gomès authored
This is useful when debugging.
-
- Jun 16, 2022
-
-
Raphaël Gomès authored
- Jun 08, 2022
-
-
Raphaël Gomès authored
This is in case this ever comes up, it's very easy to support, so might as well do it.
-
Raphaël Gomès authored
This will be used in the upcoming support for sparse checkouts in Rust-augmented status and later in rhg support for sparse checkouts.
-
Raphaël Gomès authored
This will be used in the upcoming support for sparse checkouts in Rust-augmented status and later in rhg support for sparse checkouts.
-
Raphaël Gomès authored
This simplifies the code a lot, allows for some refactoring to come. The original code tried to prevent allocations that were already happening anyway beforehand.
-
Raphaël Gomès authored
The assumption that we need to rewrite (or append to) the dirstate if the ignore pattern hash has changed or if any cached directory mtimes have changed is only valid when using dirstate-v2. In dirstate-v1, neither of these things are written to disk.
-
Raphaël Gomès authored
-
- May 24, 2022
-
-
kiilerix authored
This "15.0.*" requirement came from 0d99778af68a and is now replaced with plain "15.0". AFAICS, it really should allow (but not necessarily require) im-rc 15.1 . Narrow requirement requirements with wildcard in the version is not used in other places.
-
- May 25, 2022
-
-
Raphaël Gomès authored
-
- May 22, 2022
-
-
Arseniy Alekseyev authored
returning a valid entry for nullrev fix chain that delta against nullrev.
-
- Apr 05, 2022
-
-
Pierre-Yves David authored
This is similar to what we introduced for `share-safe`, but apply to the tracked-hint feature. Differential Revision: https://phab.mercurial-scm.org/D12613
-
- Apr 15, 2022
-
-
Raphaël Gomès authored
These can be used by any client crates (including `rhg`), no need to make them private to the crate. Differential Revision: https://phab.mercurial-scm.org/D12610
-