- Dec 01, 2020
-
-
Augie Fackler authored
This means that naive contributors who just run `black` on a source file will get reasonable behavior as long as they have a recent black. Yay! Differential Revision: https://phab.mercurial-scm.org/D9834
-
Augie Fackler authored
This will tell pip et al to call our setup.py for the majority of packaging concerns, but also gives us a place to put standard config stuff like black. Differential Revision: https://phab.mercurial-scm.org/D9833
-
- Jan 14, 2021
-
-
Pulkit Goyal authored
Upgrade operations which involves just upgrading requirements earlier used to go through whole revlog cloning business. Now we just upgrade the requirement and skip the cloning part. Differential Revision: https://phab.mercurial-scm.org/D9775
-
Pulkit Goyal authored
This will help making next patch easier to read. Differential Revision: https://phab.mercurial-scm.org/D9774
-
Pulkit Goyal authored
Upcoming patches will skip revlog cloning for share-safe upgrades. Differential Revision: https://phab.mercurial-scm.org/D9773
-
Pulkit Goyal authored
Upgrading the repository to use share safe functionality only touches requirements. Differential Revision: https://phab.mercurial-scm.org/D9772
-
- Dec 14, 2020
-
-
Pulkit Goyal authored
To make upgrade work less in certain situations, we need to teach it to find out what all parts of repository current operation is touching. This patch starts doing that. In next patch we will be setting values in improvement objects. For now, we assume everything touches everything. Differential Revision: https://phab.mercurial-scm.org/D9771
-
- Jan 14, 2021
-
-
Pulkit Goyal authored
If the user explicitly mentioned that they don't need backup, then let's not create it. Differential Revision: https://phab.mercurial-scm.org/D9770
-
- Dec 14, 2020
-
-
Victor Stinner authored
* Replace "Py_TYPE(obj) = type;" with "Py_SET_TYPE(obj, type);" * Add pythoncapi_compat.h header file to get Py_SET_TYPE() on Python 2.7-3.8. Header file added to mercurial/ and contrib/python-zstandard/zstd/common/. In Python 3.10, Py_TYPE(obj) must not longer be used as an l-value. pythoncapi_compat.h comes from: https://github.com/pythoncapi/pythoncapi_compat Differential Revision: https://phab.mercurial-scm.org/D9825
-
- Jan 20, 2021
-
-
Jörg Sonnenberger authored
For changesets, it is useful to cache the content as it will almost always be processed afterwards. For manifests on the other hand, the content is often not used directly as there is a fast path for deltas. Explicitly disable the cache in exchangev2's manifest handling for that reason. Differential Revision: https://phab.mercurial-scm.org/D9847
-
- Jan 15, 2021
-
-
Jörg Sonnenberger authored
Historically, the revision to branch mapping cache was updated on demand and shared via bundle2 to avoid the cost of rebuilding on first use. Use the new `register_changeset` callback and update rbc directly on every change. Make the transfer of the bundle part redundant, but keep it for the moment to avoid the test churn. Over all, "hg unbundle" for large bundles is less than 1.8% slower for different larger repositories and that seems to a reasonable trade off. Differential Revision: https://phab.mercurial-scm.org/D9781
-
- Jan 18, 2021
-
-
Jörg Sonnenberger authored
The new callback is called whenever a changeset is added to the repository (commit, unbundle or exchange). Since the bulk operations already parse the changeset (readfiles or full changesetrevision), always use the latter to avoid redundant lookups. The first consumer of the new interface needs to look at extra. Differential Revision: https://phab.mercurial-scm.org/D9780
-
- Jan 15, 2021
-
-
Jörg Sonnenberger authored
The function parses the extra dictionary after looking up the changelogrevision. To avoid duplicated look up, it is better to provide it as property of changelogrevision instead. Keep the function for a release cycle as at least the topic extension depends on it. Differential Revision: https://phab.mercurial-scm.org/D9779
-
- Jan 22, 2021
-
-
Dan Villiom Podlaski Christiansen authored
As discussed on D9671#146704 this lowers the error to a warning. Differential Revision: https://phab.mercurial-scm.org/D9852
-
- Jan 18, 2021
-
-
sliquister authored
The motivation is simple: it's nicer to avoid gating basic functionality. To reduce the risk of people shooting themselves in the feet, `--confirm` is now the default, unless the extensions is loaded.. For review of the body of the purge command, use this instead of what hg/phabricator will show (the block of code is modified, not just moved): Differential Revision: https://phab.mercurial-scm.org/D9820
-
Pierre-Yves David authored
Getting the exact number is simple (you have to project the result of previous deletion to detect super-directory with only about-to-be-deleted content). So we use a vaguer message. Differential Revision: https://phab.mercurial-scm.org/D9819
-
Pierre-Yves David authored
The options provide a prompt to the user before permanent deletion are made. The prompt is currently not aware of directory deletion. I'll fix this in the next changesets. Differential Revision: https://phab.mercurial-scm.org/D9818
-
- May 11, 2020
-
-
Augie Fackler authored
This is a version of merge3 that always reports success, so that conflict markers get preserved without us having to implement conflict storage for in-memory merge. Credit to martinvonz for the idea. The only planned consumer of this "merge tool" is my upcoming merge-diffs functionality, though I suspect it could be useful in other ways. Differential Revision: https://phab.mercurial-scm.org/D8515
-
- May 28, 2020
-
-
Augie Fackler authored
Use it in a test case where we know the rebase should proceed without incident in-memory, so we can see tracebacks rather than fallbacks. This makes it easier to try and debug when things are broken. Differential Revision: https://phab.mercurial-scm.org/D8623
-
- May 18, 2020
-
-
Augie Fackler authored
This avoids some pointless copying. Differential Revision: https://phab.mercurial-scm.org/D8566
-
- Jan 15, 2021
-
-
Jörg Sonnenberger authored
In preperation for updating the reverse-branch-cache incrementally whenever a new changeset comes in, avoid bad performance on resize with Python 3.7 (and likely other 3.x versions). Differential Revision: https://phab.mercurial-scm.org/D9778
-
- Jan 17, 2021
-
-
Pierre-Yves David authored
This get useful for running analysis of the current algorithm. Differential Revision: https://phab.mercurial-scm.org/D9813
-
- Jan 18, 2021
-
-
Jörg Sonnenberger authored
Accessing the revlog by node is slightly more expensive than by revision, so look up the revision first and use it afterwards. Differential Revision: https://phab.mercurial-scm.org/D9831
-
Jörg Sonnenberger authored
Look-up by node is slightly more expensive, so since it is necessary more than once, do it explicitly. Differential Revision: https://phab.mercurial-scm.org/D9830
-
- Jan 19, 2021
-
-
Martin von Zweigbergk authored
The conflict markers created by `:mergediff` were not detected as conflicts, which affects both `commands.resolve.mark-check` and `mergetools.<tool>.check`. This patch fixes that. The new regex it uses for finding conflict markers is less restrictive because it `:mergediff` doesn't follow the `<<<<<<<` and `>>>>>>>` lines by a space (and a description). Hopefully lines like that don't give too many false positives. We can add back the space and make `:mergediff` add trailing spaces if it turns out to be a problem. OTOH, there will always be some false positives and we have ways of overriding the checks already. This patch can go onto the default or stable branch, depending on how much we care about an experimental feature. Differential Revision: https://phab.mercurial-scm.org/D9835
-
Martin von Zweigbergk authored
The function has been unused ever since it was introduced in 465b9ea02868 (Import 3-way merge code from bzr, 2007-04-16). Differential Revision: https://phab.mercurial-scm.org/D9832
-
- Dec 04, 2020
-
-
Pierre-Yves David authored
This is the one command namespace where they should not be any ambiguity about command that should be in it. The perf extensions is only adding performance related command. so this is a good ground to start putting dash folding to the tests. Differential Revision: https://phab.mercurial-scm.org/D9516
-
- Jan 19, 2021
-
-
Augie Fackler authored
-
Pulkit Goyal authored
-
Pulkit Goyal authored
-
Pulkit Goyal authored
-
- Jan 18, 2021
-
-
Pulkit Goyal authored
The share-safe functionality is complete and all configuration options are implemented. The behavior is well discussed on mailing list and in reviews. Let's unmark this as experimental to solve a chichen and egg issue. Differential Revision: https://phab.mercurial-scm.org/D9823
-
- Jan 15, 2021
-
-
Pulkit Goyal authored
Config introduced in previous patch was `share.source-safe-mismatch`. Let's rename the warn as `share.source-safe-mismatch.warn`. While we are here, made sure we have different configs for upgrade and downgrade. Differential Revision: https://phab.mercurial-scm.org/D9786
-
- Jan 18, 2021
-
-
Pulkit Goyal authored
Recently I implemented various boolean configs which control how to behave when there is a share-safe mismatch between source and share repository. Mismatch means that source supports share-safe where as share does not or vice versa. However, while discussion and documentation we realized that it's too complicated and there are some combinations of values which makes no sense. We decided to introduce a config option with 4 possible values which makes controlling and understanding things easier. The config option `share.safe-mismatch.source-{not-}safe` can have following 4 values: * abort (default): error out if there is mismatch * allow: allow to work with respecting share source configuration * {up|down}grade-abort: try to {up|down}grade, if it fails, abort * {up|down}grade-allow: try to {up|down}grade, if it fails, continue in allow mode I am not sure if I can explain 3 config options which I deleted right now in just 5 lines which is a sign of how complex they became. No test changes demonstrate that functionality is same, only names have changed. Differential Revision: https://phab.mercurial-scm.org/D9785
-
Pulkit Goyal authored
The share-safe functionality is complete and all configuration options are implemented. The behavior is well discussed on mailing list and in reviews. Let's unmark this as experimental to solve a chichen and egg issue. Differential Revision: https://phab.mercurial-scm.org/D9823
-
- Jan 15, 2021
-
-
Pulkit Goyal authored
Config introduced in previous patch was `share.source-safe-mismatch`. Let's rename the warn as `share.source-safe-mismatch.warn`. While we are here, made sure we have different configs for upgrade and downgrade. Differential Revision: https://phab.mercurial-scm.org/D9786
-
- Jan 18, 2021
-
-
Pulkit Goyal authored
Recently I implemented various boolean configs which control how to behave when there is a share-safe mismatch between source and share repository. Mismatch means that source supports share-safe where as share does not or vice versa. However, while discussion and documentation we realized that it's too complicated and there are some combinations of values which makes no sense. We decided to introduce a config option with 4 possible values which makes controlling and understanding things easier. The config option `share.safe-mismatch.source-{not-}safe` can have following 4 values: * abort (default): error out if there is mismatch * allow: allow to work with respecting share source configuration * {up|down}grade-abort: try to {up|down}grade, if it fails, abort * {up|down}grade-allow: try to {up|down}grade, if it fails, continue in allow mode I am not sure if I can explain 3 config options which I deleted right now in just 5 lines which is a sign of how complex they became. No test changes demonstrate that functionality is same, only names have changed. Differential Revision: https://phab.mercurial-scm.org/D9785
-
- Jan 14, 2021
-
-
Pulkit Goyal authored
Earlier we used to allow shares which don't use share-safe mechanism to access repository which uses share-safe mechanism. This defeats the purpose and is bad behavior. This patch disallows that. Next patch will introduce a config option to allow that and have clearer understanding around various options. Differential Revision: https://phab.mercurial-scm.org/D9784
-
- Jan 18, 2021
-
-
Pulkit Goyal authored
Since we are writing to repository, it's better to re-read after taking the lock. Differential Revision: https://phab.mercurial-scm.org/D9822
-
- Jan 14, 2021
-
-
Pulkit Goyal authored
The final config calculation code does not require a lock, only writing it back does require one. Differential Revision: https://phab.mercurial-scm.org/D9783
-