- Feb 23, 2023
-
-
Pierre-Yves David authored
Branch is a bit special : - It currently does not collaborate with the transaction (or any scoping) for writing (this is bad) - It can change without the lock being taken (it is protected by `wlock`) So we rely on the same mechanism as for the backup of the other dirstate file: - we only do a backup if we hold the wlock - we force a backup though the transaction Since "branch" write does not collaborate with the transaction, we cannot back it up "at the last minute" as we do for the dirstate. We have to back it up "upfront". Since we have a backup, the transaction is no longer doing its "quick_abort" and get noisy. Which is quite annoying. To work around this, and to avoid jumping in yet-another-rabbit-hole of "getting branch written properly", I am doing horrible things to the transaction in the meantime. We should be able to get this code go away during the next cycle. In the meantime, I prefer to take this small stop so that we stop abusing the "journal" and "undo" mechanism instead of the proper backup mechanism of the transaction. Also note that this change regress the warning message for the legacy fallback introduced in 2008 when issue902 got fixed in dd5a501cb97f (Mercurial 1.0). I feel like this is fine as issue 902 remains fixed, and this would only affect people deploying a mix of 15 year old Mercurial and modern mercurial, and using branch and rollback extensively.
-
Pierre-Yves David authored
The transaction file generation is already dealing with the backup for this. So, no need to duplicate such backup.
-
- Feb 22, 2023
-
-
Pierre-Yves David authored
The transaction file generation is already dealing with the backup for this. So, no need to duplicate such backup.
-
- Feb 23, 2023
-
-
Pierre-Yves David authored
-
Pierre-Yves David authored
It will be simpler if all write happens within transaction.
-
Pierre-Yves David authored
That way, the narrow spec changes will be done within a transaction.
-
Pierre-Yves David authored
It will be simpler if all write happens within transaction.
-
Pierre-Yves David authored
Now that the transaction manage the writes, we can simply use the transaction for backup. Some extra cleanup to ensure all changes happens within a transaction will be made in the next changesets.
-
Pierre-Yves David authored
This make it more transactional and will help us to simplify their backup. The implementation is not great, but it keep the patch simple as this is not the time for a larger refactoring yet.
-
Pierre-Yves David authored
This make it more transactional and will help us to simplify their backup. The implementation is not great, but it keep the patch simple as this is not the time for a larger refactoring yet.
-
Pierre-Yves David authored
Relying on disk data make the transactionally of this change complicated, so let us start reading data from other API instead.
-
- Feb 22, 2023
-
-
Pierre-Yves David authored
The tracking configuration we modify must be read under lock. So we grab the lock sooner.
-
- Feb 23, 2023
-
-
Pierre-Yves David authored
This will help us to improve the locking scope in the `tracked` command.
-
- Feb 24, 2023
-
-
Arseniy Alekseyev authored
For example, on my box I'm seeing: $TESTTMP.sh: line 250: $pid Killed hg ci -qAm z
-
- Feb 23, 2023
-
-
Arseniy Alekseyev authored
To achieve this, we turn commit sorters into classes so they can encapsulate state. This reduces the sorting time from ~30s to ~10s on a 500k-commit prefix of a repo I tried to convert. (and probably reduces the time to sort the whole repo from many tens of minutes to minutes, but I didn't try that again) The date caching gets removed because priority queue already caches the key.
-
- Feb 21, 2023
-
-
Matt Harbison authored
Not bothering with the args, because there are a few overloads and only 2 callers in the codebase, one of which is a test.
-
Matt Harbison authored
The typeshed hints define 5 overloads with an increasing number of parameters on the passed function, and then a catchall that ignores the argument list on the passed function and allows an `*iterators` arg. All of our uses are fulfilled by the 1 function + 1 iterable overload, but add the second overload as a hint in case it's needed in the future.
-
- Feb 22, 2023
-
-
Pierre-Yves David authored
This show that the recent changes on default fixed the issue with transaction overwriting content in `test-transaction-wc-rollback-race.t`
-
Pierre-Yves David authored
We actually do not! Great.
-
Pierre-Yves David authored
spoiler: we do… /o\
-
Pierre-Yves David authored
We actually do not! Great. …Why are doing a backup of the `branch` files at transaction creation then‽
-
Pierre-Yves David authored
spoiler: we do…
-
Pierre-Yves David authored
See inline documentation for details. See other changesets for actual cases.
-
Pierre-Yves David authored
Before this change the two parents from the merge would duplicate some command output and modify some others in a way python 3.11 chokes on.
-
- Feb 17, 2023
-
-
Arseniy Alekseyev authored
Use the slices for `basename` and `ext` instead of dealing with offsets.
-
Arseniy Alekseyev authored
Use [shrink_to_fit] to match the previous behavior more closely, and potentially save (a tiny bit) of memory. FWIW, I suspect this is unnecessary, but this whole MR is about simplifying things while preserving any existing optimizations.
-
- Feb 16, 2023
-
-
Arseniy Alekseyev authored
Instead, directly do what the "+ 1" was supposed to achive: call hash_encode.
-
Arseniy Alekseyev authored
No need to have a trivial wrapper over the type. There's nothing confusing about vec.write_bytes(...), after all.
-
Arseniy Alekseyev authored
Two separate types make the write semantics easier to understand because we can consider the two sinks separately. Having two independent compiled functions for size measurement and for actual encoding seems likely to improve performance, too. (and maybe we should get rid of measurement altogether) Getting rid of [Dest] also removes the ugly option rewrapping code, which is good.
-
Arseniy Alekseyev authored
This simplifies code a bit more, but comes with an extra memory copy in case [destlen == dest_vec.len()]. This is probably fine, but a follow-up change is removing that too.
-
Arseniy Alekseyev authored
-
Arseniy Alekseyev authored
This is an implementation of Sink trait that writes into a fixed-size buffer on the stack, so identical to what was done before, but it makes the code of [hash_encode] easier to understand by dropping all these slice manipulations.
-
Arseniy Alekseyev authored
Hopefully this makes the code easier to read and understand and shorter overall. It also lets us later tweak the type we use as a [Sink], without having to change the encoding functions, including using two different types for size measurement and for the actual serialization.
-
Arseniy Alekseyev authored
Moving the addition of '/' separator to the end of the loop makes the rest of the logic much simpler because the first iteration is no longer special.
-
- Feb 20, 2023
-
-
Pierre-Yves David authored
Heptapod published the obsolete version of those.
-
- Feb 21, 2023
-
-
Pierre-Yves David authored
Heptapod published the obsolete version of those.
-
- Feb 19, 2023
-
-
Pierre-Yves David authored
Heptapod published the obsolete version of those.
-
- Feb 22, 2023
-
-
Pierre-Yves David authored
This was the last method not scoped yet
-
Pierre-Yves David authored
We are obviously mutating the dirstate, so lets scope this mutation.
-
Pierre-Yves David authored
We don't want them called within a `changing_parents` context, but we still want them called within a context. So we update the decorator accordingly
-