test: replace a many occurence of `python` with `$PYTHON`
Otherwise this can use the wrong python version, or worse, not find any python
at all.
Differential Revision: https://phab.mercurial-scm.org/D9730
tests: make test-subrepo-git.t compatible with git's master->main rename
Git is about to change the default branch from "master" to
"main". Recent versions has started warning about that, which makes
tests fail. I assume the tests would fail in a different way once the
default has changed. To make us compatible with that name change,
let's set configure the default to be "master". That value makes the
tests still work on older Git version (those where the default branch
name is not configurable).
Differential Revision: https://phab.mercurial-scm.org/D9746
revlog: use size_t for nodetree capacity
This allows handling revlog containing more than
33554432 (INT_MAX /
sizeof(nodetreenode)) revisions on x64 platforms.
Differential Revision: https://phab.mercurial-scm.org/D9745
upgrade: demonstrate that a no-op upgrade still performs everything
An upgrade operation which is not adding or removing anything should ideally
error out. However, it does the whole cloning and everything. Next patch will
fix it.
Differential Revision: https://phab.mercurial-scm.org/D9694
upgrade: migrated -> upgraded in ui messages
Differential Revision: https://phab.mercurial-scm.org/D9676
upgrade: remove unnecessary `is None` check
`upgrade_engine.upgrade()` always return the `backuppath` value and there are
not early returns. Hence I don't see how `backuppath` can be None.
Adding extra unncessary safe checks hides unknown bugs. Hence removing it.
Differential Revision: https://phab.mercurial-scm.org/D9675
engine: refactor code to replace stores in separate function
In not all upgrades, we need to change the whole store. For example, when
upgrading repository to share-safe mode, we don't touch revlogs at all hence
store cloning and copying is not required.
The store replacing code needs to be made aware about what all has changed and
hence only copy/rename those things. To kickstart that, this patch moves
existing logic into a separate function.
Differential Revision: https://phab.mercurial-scm.org/D9674