Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Feb 2023 04:42:17 +0100] rev 50230
narrow: write the narrow spec in a transaction during share
It will be simpler if all write happens within transaction.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Feb 2023 04:36:19 +0100] rev 50229
narrow: open the transaction sooner when unbundling
That way, the narrow spec changes will be done within a transaction.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Feb 2023 04:35:16 +0100] rev 50228
narrow: write the narrow spec in a transaction during clone
It will be simpler if all write happens within transaction.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Feb 2023 03:28:44 +0100] rev 50227
narrow: drop the dedicated backup code
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 <pierre-yves.david@octobus.net> [Thu, 23 Feb 2023 03:25:44 +0100] rev 50226
narrow: delegate the dirstate's narrow spec writing to the transaction
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 <pierre-yves.david@octobus.net> [Thu, 23 Feb 2023 04:15:16 +0100] rev 50225
narrow: delegate the narrow spec writing to the transaction
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 <pierre-yves.david@octobus.net> [Thu, 23 Feb 2023 04:02:38 +0100] rev 50224
narrow: get the narrow patterns from the repository object instead of disk
Relying on disk data make the transactionally of this change complicated, so
let us start reading data from other API instead.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Feb 2023 00:12:53 +0100] rev 50223
narrow: widden the lock context in `tracking`
The tracking configuration we modify must be read under lock. So we grab the
lock sooner.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Feb 2023 03:49:29 +0100] rev 50222
narrow: move `only_show` handling sooner in `tracked`
This will help us to improve the locking scope in the `tracked` command.
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 24 Feb 2023 13:23:15 +0000] rev 50221
tests: in test-fncache.t, be more tolerant to the "Killed" message format
For example, on my box I'm seeing:
$TESTTMP.sh: line 250: $pid Killed hg ci -qAm z
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 23 Feb 2023 23:25:28 +0100] rev 50220
convert: use a priority queue for sorting commits, to make sorting faster
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.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 21 Feb 2023 13:26:07 -0500] rev 50219
typing: add the return type hint to pycompat.rangelist()
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 <matt_harbison@yahoo.com> [Tue, 21 Feb 2023 13:24:12 -0500] rev 50218
typing: add type hints to pycompat.maplist()
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.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 22 Feb 2023 18:42:09 +0100] rev 50217
branching: merge stable into default
This show that the recent changes on default fixed the issue with transaction
overwriting content in `test-transaction-wc-rollback-race.t`
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 17 Feb 2023 16:48:11 +0000] rev 50216
rhg: in path_encode, simplify a bit more
Use the slices for `basename` and `ext` instead of dealing with offsets.
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 17 Feb 2023 13:29:39 +0000] rev 50215
rhg: in path_encode, be a bit more conservative about memory usage
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.