- Jan 11, 2021
-
-
Dan Villiom Podlaski Christiansen authored
I've seen warnings about importing distutils before setuptools, although I can't reproduce them at the moment. Differential Revision: https://phab.mercurial-scm.org/D9722
-
- Jan 13, 2021
-
-
Pulkit Goyal authored
This fixes test-check-pyflakes.t Differential Revision: https://phab.mercurial-scm.org/D9747
-
- Jan 08, 2021
-
-
Pulkit Goyal authored
Before this patch, upgrade will process everything, re-clone all revlogs, write requirements file again even there is no change to be made. This patch makes it exit earlier. Differential Revision: https://phab.mercurial-scm.org/D9695
-
Pulkit Goyal authored
For compression format variant, the result of `fromrepo()` and `fromconfig()` is not a boolean and we have to actually equate those to find change. Differential Revision: https://phab.mercurial-scm.org/D9693
-
- Dec 31, 2020
-
-
Pulkit Goyal authored
Python function calls are not cheap. Instead of calling the function once for each file in store, we use a dedicated function which filters and yields the required files. Differential Revision: https://phab.mercurial-scm.org/D9673
-
- Jan 12, 2021
-
-
Simon Sapin authored
This allows the rhg build for test-rhg.t to share compiled dependencies such as hg-core with the hg-cpython build for other tests. For context, my wrapper script for the typical edit-compile-test cycle now looks like this: (cd rust && cargo +nightly-2020-10-04 fmt) (cd rust && cargo build --release -p rhg) make --silent local PURE=--rust python test/run-tests.py --local "$@" Differential Revision: https://phab.mercurial-scm.org/D9728
-
- Dec 29, 2020
-
-
Dan Villiom Podlaski Christiansen authored
The file folding map, frequently used on macOS, had two issues: * the means for converting it to Python didn't work * a minor typo when copying the python code, where `!=` became `==` With this, the rust code passes all tests on macOS. Test Plan: I'm currently doing a full test run on a case-insensitive file system. If it passes, perhaps we can change the platform check from an error to a warning? Differential Revision: https://phab.mercurial-scm.org/D9671
-
- Jan 12, 2021
-
-
Pierre-Yves David authored
Otherwise this can use the wrong python version, or worse, not find any python at all. Differential Revision: https://phab.mercurial-scm.org/D9730
-
- Jan 13, 2021
-
-
Martin von Zweigbergk authored
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
-
- Jan 12, 2021
-
-
Jun Wu authored
This allows handling revlog containing more than 33554432 (INT_MAX / sizeof(nodetreenode)) revisions on x64 platforms. Differential Revision: https://phab.mercurial-scm.org/D9745
-
- Jan 08, 2021
-
-
Pulkit Goyal authored
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
-
- Dec 31, 2020
-
-
Pulkit Goyal authored
Differential Revision: https://phab.mercurial-scm.org/D9676
-
Pulkit Goyal authored
`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
-
Pulkit Goyal authored
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
-
Pulkit Goyal authored
Well there are no private public functions in Python, but we generally treat functions and variables starting with `_` as private ones. A function which needs to be overrided in extension should be a public one. Differential Revision: https://phab.mercurial-scm.org/D9672
-
- Dec 30, 2020
-
-
Pulkit Goyal authored
The _perform_clone function is called for each revlog cloned, hence we should prevent this function call overhead. Differential Revision: https://phab.mercurial-scm.org/D9669
-
Pulkit Goyal authored
Same as previous patch. Differential Revision: https://phab.mercurial-scm.org/D9668
-
Pulkit Goyal authored
Better to pass the operation instead of passing three of it's members (one of the them is a function call) separately. This will also be useful in future when we will like to control which things are upgraded. Differential Revision: https://phab.mercurial-scm.org/D9667
-
Pulkit Goyal authored
UpgradeOperation should provide easy access to all the things related to the current operation. Clients should not need to compute them. Differential Revision: https://phab.mercurial-scm.org/D9666
-
Pulkit Goyal authored
Instead of increasing it with each revlog, we just get the sum of total destination changelog, manifest and filelogs sizes. Differential Revision: https://phab.mercurial-scm.org/D9665
-
- Dec 16, 2020
-
-
Pulkit Goyal authored
For certain imporvements, we will like to show a message after the operation completed. This patch introduces that functionality. Right now it's only used by share-safe feature. Differential Revision: https://phab.mercurial-scm.org/D9619
-
Pulkit Goyal authored
An upgrade operation can also downgrade/remove some format variants. Before this patch there was no clean way to find out all such variants which will be removed. This patch adds a function for that. It will be used in next patch. Differential Revision: https://phab.mercurial-scm.org/D9618
-
Pulkit Goyal authored
When we specify `--no-changelog --no-manifest --no-filelog` we skip all revlog optimization instead of all filelog optimization. Also while I was here, for consistency, I did `optimisation` -> `optimization` to make it consistent with rest of occurrences. Note: I am not native speaker and I only changed it because of consistency. I don't know which one is correct. Differential Revision: https://phab.mercurial-scm.org/D9617
-
Pulkit Goyal authored
The `actions` were a list of optimizations and format upgrades which will be upgraded. This does not include things which will be downgraded. Let's rename the variable for clarity. It now makes obvious that we don't have any concrete information on what things are downgraded. Differential Revision: https://phab.mercurial-scm.org/D9616
-
Pulkit Goyal authored
The documentation of `determineactions()` mention that it is given a list returned from `findoptimizations()` however it was not true before this patch. The code extending actions with optimizations also mentioned about it that this should be in determineactions. So let's do what comments at couple of places say. Differential Revision: https://phab.mercurial-scm.org/D9615
-
Pulkit Goyal authored
Old style optimization names like `redeltaparent` were converted into `re-delta-parent` more than two years ago. The old names were kept around for sometime because of BC reasons. Refer 5608b5a6c323. The commit states the map is there for a while and we can drop them as the underlying command is a debug command. Differential Revision: https://phab.mercurial-scm.org/D9614
-
- Dec 14, 2020
-
-
Pulkit Goyal authored
Found while reading the code to refactor. Differential Revision: https://phab.mercurial-scm.org/D9583
-
- Dec 30, 2020
-
-
Pulkit Goyal authored
It was not obvious what does deficieny means and every format change can't be a deficiency. There are some format changes like compression levels, share-safe which can't be understood at deficiencies. This patch renames the constant to make things clearer. Differential Revision: https://phab.mercurial-scm.org/D9664
-
- Dec 14, 2020
-
-
Pulkit Goyal authored
It was not obvious what does deficieny means and every format upgrade can't be a deficiency. There are some format upgrades like compression levels, share-safe which can't be understood at deficiencies. A change can be an upgrade or downgrade, however this `finddeficiences()` only used to find upgrades. This patch renames the function and related variables to make things more clearer. The ui message also got improved which is a good thing. Next patch will rename deficiency in general across the upgrade code. Differential Revision: https://phab.mercurial-scm.org/D9582
-
- Jan 02, 2021
-
-
msuozzo authored
The existing "circle with vertical fill" character renders as full width in many terminals making the beautified symbols have uneven size. Additionally, the proposed "fisheye" character is the logic 'active' version of the current merge symbol, "bullseye." Differential Revision: https://phab.mercurial-scm.org/D9678
-
- Jan 11, 2021
-
-
Augie Fackler authored
-
- Dec 28, 2020
-
-
Jörg Sonnenberger authored
For Python 2.7, the implicit conversion of the HTTPError instance to str was good enough. For Python 3.x, this fails later when hitting the str to bytes conversion logic. Differential Revision: https://phab.mercurial-scm.org/D9661
-
- Dec 07, 2020
-
-
Pierre-Yves David authored
I am tired to see people shooting themself in the foot with this. So lets add more warning. At that point we should probably rename it or add extra confirmation flag. This is a debug command anyway we can break BC on it. Differential Revision: https://phab.mercurial-scm.org/D9534
-
- Dec 28, 2020
-
-
Jörg Sonnenberger authored
The largefiles extension replaces the "heads" wire command and tries to redirect all uses towards the custom "lheads" wire command. As seen in issue6384, this doesn't currently work for ssh. Instead of hooking into the _callstream interface, properly register the command for the peer instance and monkeypatch the executor to do the redirection. This works transparently for both all kinds of peers and both for the batch and non-batch case. Differential Revision: https://phab.mercurial-scm.org/D9663
-
- Jan 07, 2021
-
-
Jörg Sonnenberger authored
REV_OFFSET constant is 2, not 10. Differential Revision: https://phab.mercurial-scm.org/D9688
-
- Dec 20, 2020
-
-
Dan Villiom Podlaski Christiansen authored
This cannot happen during a normal Mercurial clone, but is useful for extensions like hg-git where we know what to check out — the Git HEAD — but do not wish to track it later on using the `@` bookmark. Test Plan: I have not included an explicit test, as this is much more easily tested within the `hg-git` test suite. Differential Revision: https://phab.mercurial-scm.org/D9638
-
- Dec 17, 2020
-
-
Jörg Sonnenberger authored
changelogrevision() is supposed to be used if not all data of changelog.read is used. This is the case here as only the extra field is used. This also improves extensibility as at least hgext.git doesn't implement changelog.read. Differential Revision: https://phab.mercurial-scm.org/D9626
-
- Jan 06, 2021
-
-
Jörg Sonnenberger authored
Differential Revision: https://phab.mercurial-scm.org/D9687
-
- Jan 07, 2021
-
-
Jörg Sonnenberger authored
Differential Revision: https://phab.mercurial-scm.org/D9689
-
- Dec 14, 2020
-
-
Pulkit Goyal authored
The loop was iterating over all the datafiles and maintaining a set to check whether filelogs have been processed, manifests have been processed or not. The code was hard to understand and it assumed that `alldatafiles` are ordered in a certain way. This refactors the for loop in separate parts for each manifests, changelog and filelogs. This will also help in future work where we will like more better handling on whether we want to upgrade filelogs or not. Differential Revision: https://phab.mercurial-scm.org/D9580
-