- Dec 03, 2021
-
-
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
-
- Nov 26, 2021
-
-
Raphaël Gomès authored
Differential Revision: https://phab.mercurial-scm.org/D11807
-
- Nov 25, 2021
-
-
Simon Sapin authored
Differential Revision: https://phab.mercurial-scm.org/D11840
-
- Dec 02, 2021
-
-
Simon Sapin authored
This method is not used yet. It saves to disk any mutation that was done to the `Repo`’s dirstate through `Repo::dirstate_map_mut`. It takes care of dirstate-v1 v.s. dirstate-v2, dockets, data files, appending when possible, etc. Differential Revision: https://phab.mercurial-scm.org/D11839
-
Simon Sapin authored
The `dirstate_parents`, `dirstate_data_file_uuid`, and `dirstate_map` members of `Repo` can be access in any order and the `.hg/dirstate` file should only be opened once. Differential Revision: https://phab.mercurial-scm.org/D11838
-
- Nov 29, 2021
-
-
Simon Sapin authored
Unify with the same abstraction used for other lazily-initialized components Differential Revision: https://phab.mercurial-scm.org/D11837
-
Simon Sapin authored
This method writes to a temporary file then renames in place Differential Revision: https://phab.mercurial-scm.org/D11836
-
- Mar 22, 2021
-
-
Simon Sapin authored
Initial Rust implementation of locking based on the `.hg/wlock` symlink (or file), with lock breaking when the recorded pid and hostname show that a lock was left by a local process that is not running anymore (as it might have been killed). Differential Revision: https://phab.mercurial-scm.org/D11835
-
- Nov 29, 2021
-
-
Simon Sapin authored
Differential Revision: https://phab.mercurial-scm.org/D11834
-
- Nov 26, 2021
-
-
Raphaël Gomès authored
You currently have no way of turning off blackbox. Aside from being a bug, this can be annoying if you use `rhg` in your shell prompt, but also because the current implementation of blackbox is quite slow due to `user` querying. Differential Revision: https://phab.mercurial-scm.org/D11813
-
Raphaël Gomès authored
This will be used in the next patch Differential Revision: https://phab.mercurial-scm.org/D11812
-
- Dec 03, 2021
-
-
Raphaël Gomès authored
Its last usage was inlined in `merge.py`. Differential Revision: https://phab.mercurial-scm.org/D11849
-
- Dec 04, 2021
-
-
Pierre-Yves David authored
They are minor output different to be taken in account. Differential Revision: https://phab.mercurial-scm.org/D11861
-
- Nov 16, 2021
-
-
Arseniy Alekseyev authored
This adds a minimal support that can be implemented without parsing the narrowspec. We can parse the narrowspec and add support for more operations later. The reason we need so few code changes is as follows: Most operations need no special treatment of sparse because some of them only read dirstate (`rhg files` without `-r`), which bakes in the filtering, some of them only read store (`rhg files -r`, `rhg cat`), and some of them read no data at all (`rhg root`, `rhg debugrequirements`). `status` is the command that might care about sparse, so we just disable rhg on it. For narrow clones, `rhg files` clearly needs the narrowspec to work correctly, so we fall back. `rhg cat` seems to work consistently with `hg cat` if the file exists. If the file is hidden by narrow spec, the error message is different and confusing, so that's something that we should improve in follow-up patches. Differential Revision: https://phab.mercurial-scm.org/D11764
-
- Dec 03, 2021
-
-
Pierre-Yves David authored
This make the various option clearer. Differential Revision: https://phab.mercurial-scm.org/D11852
-
Pierre-Yves David authored
Before this change `--merge` override `commands.update.check=abort/noconflict`, and `--check` "override" `commands.update.check=none/linear`. However the `--no-merge` and `--no-check` version where not doing anything. The `--no-` two flags now behave properly. Differential Revision: https://phab.mercurial-scm.org/D11851
-
Pierre-Yves David authored
I don't see this behavior tested anywhere. Differential Revision: https://phab.mercurial-scm.org/D11850
-
Pierre-Yves David authored
This helps readability and searchability. Differential Revision: https://phab.mercurial-scm.org/D11848
-
- Nov 22, 2021
-
-
Raphaël Gomès authored
This is the re-send of the backout in D11757 that I accidentally queued. I'll rewrite the original commit message: ...sigh We do not have Python 3 packaging for thg on Windows where the vast majority of of users use the thg installer for Mercurial. Until this is done (hopefully this cycle), we're keeping Python. (end of the old commit message) On top of this, we have a solid lead to have competent people take care of this packaging issue for us in time for the 6.1 release, which is really the main reason for us to wait. We're trying our best to make this work, so please bear with us. Differential Revision: https://phab.mercurial-scm.org/D11770
-
- Nov 24, 2021
-
-
Pierre-Yves David authored
Now that we support the feature, we can keep "second ambiguous" mtime during the fixup phase. These are the mtime that would be ambiguous if we did not had sub-second précions. See the v2 format documentation for details. Differential Revision: https://phab.mercurial-scm.org/D11847
-
Pierre-Yves David authored
Now that we support the associated logic, we can safely load it from it. It is no longer necessary to ignore the stored mtime when the flag is encountered. Differential Revision: https://phab.mercurial-scm.org/D11846
-
Pierre-Yves David authored
We want to preserve the second-ambiguity alongside the ambiguous mtime. So we use the decimated flag for that. note: the C code was already doing so. No change was needed to it. Differential Revision: https://phab.mercurial-scm.org/D11845
-
Pierre-Yves David authored
We cannot preserve that information in the v1 format so that mtime is ambiguous. Differential Revision: https://phab.mercurial-scm.org/D11844
-
Pierre-Yves David authored
If the flag is set we now process it properly. We "just" need to actually set it and persist it. Differential Revision: https://phab.mercurial-scm.org/D11843
-
Pierre-Yves David authored
This will be used to support the `mtime-second-ambiguous` flag from dirstate v2. See format documentation for details. For now, we only make it possible to store the information, no other logic have been added. Differential Revision: https://phab.mercurial-scm.org/D11842
-
- Nov 23, 2021
-
-
Pierre-Yves David authored
All comparison are now managed without using operator : - the status mtime comparisons is handled by the DirstateItem, - the fixup reliability check, - the update "hack". So we no longer needs the operator and should discourage its usage. Differential Revision: https://phab.mercurial-scm.org/D11841
-
Pierre-Yves David authored
This will prevent ambiguous cache entry to be used in racy situation. This fix flakiness in test and some real live misbehavior. Differential Revision: https://phab.mercurial-scm.org/D11800
-
Pierre-Yves David authored
Some extensions will need it too. So lets isolate the logic. It also makes things clearer. Differential Revision: https://phab.mercurial-scm.org/D11799
-
Pierre-Yves David authored
If the test was fast enough, some mtime where not stored. We now wait long enough to ensure the mtime is no longer ambiguous. Differential Revision: https://phab.mercurial-scm.org/D11798
-
- Nov 19, 2021
-
-
Pierre-Yves David authored
Since the whole `need_delay` have been removed, we no longer need this. Differential Revision: https://phab.mercurial-scm.org/D11797
-
Pierre-Yves David authored
Now that all¹ stored mtime are non ambiguous, we no longer need to apply the `need_delay` step. The need delay logic was not great are mtime gathered during longer operation could be ambiguous but younger than the `dirstate.write` call time. So, we don't need that logic anymore and can drop it This make the code much simpler. The code related to the test extension faking the dirstate write is now obsolete and associated test will be migrated as follow up. They currently do not break. [1] except the ones from `hg update`, but `need_delay` no longer help for them either. Differential Revision: https://phab.mercurial-scm.org/D11796
-
- Oct 25, 2021
-
-
Pierre-Yves David authored
This is now redundant with the new, simpler `mtime_boundary` one. Differential Revision: https://phab.mercurial-scm.org/D11795
-
- Nov 18, 2021
-
-
Pierre-Yves David authored
We record the filesystem time at the start of the status walk and use that as a boundary to detect files that might be modified during (or right after) the status run without the mtime allowing that edition to be detected. We currently do this at a second precision. In a later patch, we will use nanosecond precision when available. To cope with "broken" time on the file system where file could be in the future, we also keep mtime for file over one day in the future. See inline comment for details. Large file tests get a bit more confused as we reduce the odds for race condition. As a "side effect", the win32text extension is happy again. Differential Revision: https://phab.mercurial-scm.org/D11794
-
Pierre-Yves David authored
In the test we want to trigger a write after the underlying dirstate changed. To do so, we need a write. And as we are about to make dirstate update smarter we need to meddle with the script a bit to make sure there will be a write. Differential Revision: https://phab.mercurial-scm.org/D11793
-
- Nov 23, 2021
-
-
Pierre-Yves David authored
Otherwise the could get size from one version of the file while the on-disk version is still clean but with another size. This fix the previously introduced error. Differential Revision: https://phab.mercurial-scm.org/D11792
-
- Nov 17, 2021
-
-
Pierre-Yves David authored
Gathering information here assume that they are valid cache information for a clean file. It is true most of the time, but not garanteed. Accurate data can still be explicitly provided. We drop the spontaneous and will let the next `hg status` call record actual information. Differential Revision: https://phab.mercurial-scm.org/D11791
-
Pierre-Yves David authored
Gathering information here assume that they are valid cache information for a clean file. It is true most of the time, but not garanteed. So we drop this and will let the next `hg status` call record actual information. Differential Revision: https://phab.mercurial-scm.org/D11790
-
Pierre-Yves David authored
Gathering the mode, size and mtime, independently from determining that the file is clean is a race-machine. So we just make these information required arguments. (note that the data is still gathered in a racy way in practice, but at least the API is no longer encouraging it.) Differential Revision: https://phab.mercurial-scm.org/D11789
-