Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Jan 2021 23:07:56 +0100] rev 46385
minirst: respect escaping in definition list key
If we start adding `:` in command names… we need minirst to not choke on them.
Differential Revision: https://phab.mercurial-scm.org/D9869
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Jan 2021 00:45:40 +0100] rev 46384
run-test: avoid byte issue when replacing output file of python test
Otherwise we get error like::
FileNotFoundError: [Errno 2] No such file or directory: "b'…/tests/test-minirst.py'.out"
Differential Revision: https://phab.mercurial-scm.org/D9868
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Jan 2021 16:34:43 +0100] rev 46383
store: use `endswith` to detect revlog extension
Suggested by Gregory Szorc.
Differential Revision: https://phab.mercurial-scm.org/D9865
Augie Fackler <augie@google.com> [Tue, 01 Dec 2020 12:59:33 -0500] rev 46382
black: merge config into main pyproject.toml now that we have it
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 <augie@google.com> [Tue, 01 Dec 2020 12:52:04 -0500] rev 46381
pyproject: add config file
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
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 14 Jan 2021 16:37:10 +0530] rev 46380
upgrade: update only requirements if we can
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 <7895pulkit@gmail.com> [Thu, 14 Jan 2021 16:34:58 +0530] rev 46379
engine: add `if True` to prepare for next patch
This will help making next patch easier to read.
Differential Revision: https://phab.mercurial-scm.org/D9774
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 14 Jan 2021 17:27:54 +0530] rev 46378
test: unquiet few tests to demonstrate changes in upcoming patches
Upcoming patches will skip revlog cloning for share-safe upgrades.
Differential Revision: https://phab.mercurial-scm.org/D9773
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 14 Jan 2021 16:57:11 +0530] rev 46377
upgrade: mark sharesafe improvement as only touching requirements
Upgrading the repository to use share safe functionality only touches
requirements.
Differential Revision: https://phab.mercurial-scm.org/D9772
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 14 Dec 2020 16:20:00 +0530] rev 46376
actions: calculate what all parts does the operation touches
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
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 14 Jan 2021 16:25:40 +0530] rev 46375
upgrade: don't create store backup if `--no-backup` is passed
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
Victor Stinner <vstinner@python.org> [Mon, 14 Dec 2020 10:44:29 +0100] rev 46374
cext: add Python 3.10 support
* 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
Joerg Sonnenberger <joerg@bec.de> [Wed, 20 Jan 2021 14:47:13 +0100] rev 46373
revlog: decouple caching from addrevision callback for addgroup
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
Joerg Sonnenberger <joerg@bec.de> [Fri, 15 Jan 2021 01:58:59 +0100] rev 46372
branchmap: update rev-branch-cache incrementally
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
Joerg Sonnenberger <joerg@bec.de> [Tue, 19 Jan 2021 00:20:53 +0100] rev 46371
repository: introduce register_changeset callback
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
Joerg Sonnenberger <joerg@bec.de> [Fri, 15 Jan 2021 01:30:08 +0100] rev 46370
changelog: move branchinfo to changelogrevision
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
Dan Villiom Podlaski Christiansen <danchr@gmail.com> [Fri, 22 Jan 2021 11:10:39 +0100] rev 46369
rust: lower compile error on non-linux platforms to a warning
As discussed on D9671#146704 this lowers the error to a warning.
Differential Revision: https://phab.mercurial-scm.org/D9852
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Mon, 18 Jan 2021 10:24:20 +0100] rev 46368
purge: move extension into core mercurial
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 <pierre-yves.david@octobus.net> [Mon, 18 Jan 2021 10:24:11 +0100] rev 46367
purge: also deal with directory with --confirm
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 <pierre-yves.david@octobus.net> [Mon, 18 Jan 2021 10:24:03 +0100] rev 46366
purge: add a --confirm option
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
Augie Fackler <augie@google.com> [Mon, 11 May 2020 18:45:45 -0400] rev 46365
filemerge: add a hacktastic version of internal:merge3 for merge diffs
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
Matt Harbison <matt_harbison@yahoo.com> [Sun, 24 Jan 2021 19:14:50 -0500] rev 46364
packaging: include `windows_curses` when building py2exe
The `_curses.pyd` module was previously being included by py2exe's module
search, but it left out `_curses_panel.pyd`.
Differential Revision: https://phab.mercurial-scm.org/D9857
Matt Harbison <matt_harbison@yahoo.com> [Sun, 24 Jan 2021 19:08:47 -0500] rev 46363
packaging: allow specifying modules to include with py2exe
Maybe this was missing because there wasn't a need for it.
Differential Revision: https://phab.mercurial-scm.org/D9856
Augie Fackler <augie@google.com> [Thu, 28 May 2020 17:31:41 -0400] rev 46362
rebase: add a config knob for forcing in-memory rebasing
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
Augie Fackler <augie@google.com> [Mon, 18 May 2020 17:29:53 -0400] rev 46361
cleanup: use mergestate.unresolvedcount() instead of bool(list(unresolved()))
This avoids some pointless copying.
Differential Revision: https://phab.mercurial-scm.org/D8566
Joerg Sonnenberger <joerg@bec.de> [Fri, 15 Jan 2021 01:20:47 +0100] rev 46360
reverse-branch-cache: switch to doubling allocating scheme
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
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 17 Jan 2021 23:21:33 +0100] rev 46359
discovery: add config options to control sample size
This get useful for running analysis of the current algorithm.
Differential Revision: https://phab.mercurial-scm.org/D9813
Joerg Sonnenberger <joerg@bec.de> [Tue, 19 Jan 2021 00:20:42 +0100] rev 46358
exchangev2: avoid second look-up by node
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
Joerg Sonnenberger <joerg@bec.de> [Tue, 19 Jan 2021 00:18:39 +0100] rev 46357
commit: look-up new revision once
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
Martin von Zweigbergk <martinvonz@google.com> [Tue, 19 Jan 2021 14:00:42 -0800] rev 46356
resolve: also detect new :mergediff conflict markers
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 <martinvonz@google.com> [Mon, 18 Jan 2021 22:32:09 -0800] rev 46355
simplemerge: delete unused find_unconflicted()
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
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 04 Dec 2020 10:11:01 +0100] rev 46354
perf: use the `perf--` prefix for perf command
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