- Dec 07, 2021
-
-
Pierre-Yves David authored
A share will use the same format as its source for the store, but there are no reason to not lets it control the working copy variant at creation time. So we make it so. Differential Revision: https://phab.mercurial-scm.org/D11892
-
Pierre-Yves David authored
We will make this logic more flexible in the next patch. We start by moving it at the end of the function without any other change for clarity. Differential Revision: https://phab.mercurial-scm.org/D11891
-
- Dec 08, 2021
-
-
Pierre-Yves David authored
This give the "same" result, while taking in account that the requirement file might be in different location, like what `share-safe` is doing. Differential Revision: https://phab.mercurial-scm.org/D11895
-
Pierre-Yves David authored
This will make the test less sensible to unrelated format changing. Differential Revision: https://phab.mercurial-scm.org/D11894
-
- Dec 07, 2021
-
-
Pierre-Yves David authored
This will make the test less sensible to unrelated format changing. Differential Revision: https://phab.mercurial-scm.org/D11893
-
Kyle Lippincott authored
Sometimes other code, such as commit when using `commands.commit.post-status`, calls `commands.status()` without going through the normal dispatch mechanism that would typically fill in the args to be something besides None. As a "defense in depth" mechanism for a bug where Mercurial would crash if both `commands.commit.post-status` and `experimental.directaccess` were enabled, let's sanitize these values to be identical to the values they would have when the user invoked this method from the commandline. Differential Revision: https://phab.mercurial-scm.org/D11884
-
Kyle Lippincott authored
When `commands.commit.post-status` is enabled, after commit/amend, commands.status() is called without any revs argument, which means that status gets None instead of an empty list like it would receive if the user had invoked this on the commandline. With the `experimental.directaccess` config enabled, this gets passed to `unhidehashlikerevs`, which didn't previously handle None, but now should. Differential Revision: https://phab.mercurial-scm.org/D11883
-
- Nov 07, 2021
-
-
sliquister authored
In 6.0 this used to result in the size being stored in the dirstate is wrong. This was fixed by other change to the mtime gathering logic. Differential Revision: https://phab.mercurial-scm.org/D11749
-
- Dec 07, 2021
-
-
Arseniy Alekseyev authored
Differential Revision: https://phab.mercurial-scm.org/D11882
-
Arseniy Alekseyev authored
Centralize index header parsing, parse the generaldelta flag, and leave breadcrumbs to relate the code to python. Differential Revision: https://phab.mercurial-scm.org/D11881
-
Arseniy Alekseyev authored
Differential Revision: https://phab.mercurial-scm.org/D11880
-
- Dec 10, 2021
-
-
Simon Sapin authored
With dirstate-v2 and rhg both enabled, this test would sometimes fail for me with: ``` --- tests/test-status.t +++ tests/test-status.t#dirstate-v2.err @@ -943,7 +943,7 @@ $ rm subdir/unknown $ hg status $ hg debugdirstate --all --no-dates | grep '^ ' - 0 -1 set subdir + 0 -1 unset subdir ``` Meaning that `status` did not write a directory mtime in the dirstate as expected. This can happen if the observed mtime of the directory is the same as "current time" at the start of `status`. This current time is obtained by creating a temporary file and checking its mtime. Even with ext4 on my system being able to store nanosecond precision, identical mtime for successive but separate operations is still possible becuse the kernel may cache the current time: https://stackoverflow.com/a/14393315/1162888 0.1 second should be enough for this cache to be updated, without significantly slowing down the test. Differential Revision: https://phab.mercurial-scm.org/D11900
-
Simon Sapin authored
Copy sources are collected during `status()` rather than after the fact like in Python, because `status()` takes a `&mut` exclusive reference to the dirstate map (in order to potentially mutate it for directory mtimes) and returns `Cow<'_, HgPath>` that borrow the dirstate map. Even though with `Cow` only some shared borrows remain, the still extend the same lifetime of the initial `&mut` so the dirstate map cannot be borrowed again to access copy sources after the fact: https://doc.rust-lang.org/nomicon/lifetime-mismatch.html#limits-of-lifetimes Additionally, collecting copy sources during the dirstate tree traversal that `status()` already does avoids the cost of another traversal or other lookups (though I haven’t benchmarked that cost). Differential Revision: https://phab.mercurial-scm.org/D11899
-
Simon Sapin authored
… instead of a function that takes an iterator and a callback. Differential Revision: https://phab.mercurial-scm.org/D11898
-
Simon Sapin authored
Differential Revision: https://phab.mercurial-scm.org/D11897
-
Simon Sapin authored
This fixes some but not all failures in `tests/test-hgignore.t` when running with `rhg status` enabled. Differential Revision: https://phab.mercurial-scm.org/D11907
-
Pierre-Yves David authored
This was wrongly introduced in D11784. Differential Revision: https://phab.mercurial-scm.org/D11896
-
- Dec 06, 2021
-
-
Pierre-Yves David authored
Everything done by this block is now done by earlier code. So we don't need it anymore. Differential Revision: https://phab.mercurial-scm.org/D11872
-
Pierre-Yves David authored
We have more and more requirement that does not affect revlog or that only affect some of them. It is silly to force a full processing of all revlog to juste move the requirement around, or to simply rewrite the dirstate. So now, only the revlog that needs to be touched will be touched. Unless the --changelog & al flags are used. Differential Revision: https://phab.mercurial-scm.org/D11871
-
Pierre-Yves David authored
This is more explicite and prepare for a smoother transition to smarter picking of the revlog we will process. Differential Revision: https://phab.mercurial-scm.org/D11870
-
Pierre-Yves David authored
Some format upgrade/downgrades -needs- revlog to be recomputed. So we now detect that individually and warn when it contradict explicitly passed flag. This is part of a larger series to make `debugupgraderepo` smarter about which revlog it picks by default. Differential Revision: https://phab.mercurial-scm.org/D11869
-
Pierre-Yves David authored
This makes various logic simpler and will help making future patch clearer. Differential Revision: https://phab.mercurial-scm.org/D11868
-
Pierre-Yves David authored
We about about to make revlog section smarter. Moving the code around will make the next changesets clearer. Differential Revision: https://phab.mercurial-scm.org/D11867
-
- Dec 09, 2021
-
-
Simon Sapin authored
This fixes an intermittent bug that manifested only in test-revert.t, and unfortunately not on CI. On a fast enough machine we could have: 1. A file is modified 2. `rhg status` writes an updated dirstate-v1 3. The same file is modified again … all within the same integer second. Because the dirstate-v1 file format does not store sub-second precision, step 2 must write the file’s mtime as "unknown" because of the possibility of step 3. However, most of the code now handles timestamps with nanosecond precision in order to take advantage of it in dirstate-v2. `second_ambiguous` must be set for timestamps that become ambiguous if sub-second precision is dropped (such as through serialization in dirstate-v1 format). Differential Revision: https://phab.mercurial-scm.org/D11889
-
Simon Sapin authored
Differential Revision: https://phab.mercurial-scm.org/D11888
-
- Dec 07, 2021
-
-
Raphaël Gomès authored
See inline comments Differential Revision: https://phab.mercurial-scm.org/D11874
-
- Dec 08, 2021
-
-
Raphaël Gomès authored
-
- Dec 06, 2021
-
-
Pierre-Yves David authored
This used to crash as the dirstate file does not exist in this case. Differential Revision: https://phab.mercurial-scm.org/D11866
-
Pierre-Yves David authored
There is no reason to gate this anymore. Differential Revision: https://phab.mercurial-scm.org/D11865
-
- Dec 07, 2021
-
-
Pierre-Yves David authored
This breaks on Windows, so lets use `>2 /dev/null` like in the other tests. Differential Revision: https://phab.mercurial-scm.org/D11873
-
- Dec 06, 2021
-
-
Pierre-Yves David authored
This will make the test less noisy when new requirement are added. Differential Revision: https://phab.mercurial-scm.org/D11864
-
Martin von Zweigbergk authored
We now always pass `True`, so there's no need to pass it. Differential Revision: https://phab.mercurial-scm.org/D11863
-
- Dec 04, 2021
-
-
Martin von Zweigbergk authored
The caller is now trivial, so the indirection is pointless. Differential Revision: https://phab.mercurial-scm.org/D11860
-
Martin von Zweigbergk authored
This patch removes the `premerge` argument from `_filemerge()` and makes it do both the "premerge" and "merge" steps without the caller having to call it twice. Differential Revision: https://phab.mercurial-scm.org/D11859
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D11858
-
- Dec 03, 2021
-
-
Martin von Zweigbergk authored
The caller is now trivial, so the indirection is pointless. Differential Revision: https://phab.mercurial-scm.org/D11857
-
Martin von Zweigbergk authored
This patch removes the `preresolve` argument from `_resolve()` and makes it do both the "preresolve" and "resolve" steps without the caller having to call it twice. Differential Revision: https://phab.mercurial-scm.org/D11856
-
Martin von Zweigbergk authored
The separation between `preresolve()` and `resolve()` was something added for the "merge driver" feature. Since we removed that in 32ce4cbaec4b (mergedriver: delete it, 2020-09-17), we don't need the separation anymore. More cleanups will follow. Differential Revision: https://phab.mercurial-scm.org/D11855
-
- Dec 04, 2021
-
-
Martin von Zweigbergk authored
The `failfilemerge()` function always raises an exception without looking at its arguments, so let's use `*args` and `**kwargs`. Differential Revision: https://phab.mercurial-scm.org/D11854
-
- Nov 30, 2021
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D11853
-