Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Nov 2022 15:55:27 -0500] rev 49628
help: fix a py3 error interpolating Set into b'%s'
I can't reproduce it, but a coworker hit this with `hg help -v` with 6.2.3:
...
File "mercurial\help.pyc", line 865, in helplist
TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'set'
I can confirm that the original expression fails in `hg debugshell`, and the new
one works. The second instance was found by searching for "%s", but PyCharm
detects a lot of variables as Any type, so I have no idea if there are other
lurking problems.
Raphaël Gomès <rgomes@octobus.net> [Sat, 19 Nov 2022 20:40:47 +0100] rev 49627
branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Sat, 19 Nov 2022 16:14:20 +0100] rev 49626
Added signature for changeset
c890d8b8bc59
Raphaël Gomès <rgomes@octobus.net> [Sat, 19 Nov 2022 16:14:08 +0100] rev 49625
Added tag 6.3.1 for changeset
c890d8b8bc59
Raphaël Gomès <rgomes@octobus.net> [Sat, 19 Nov 2022 16:00:39 +0100] rev 49624
relnotes: add 6.3.1
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 19 Nov 2022 16:43:02 +0100] rev 49623
tests: fix test-sparse-revlog
This one is not covered by the CIbecause I requires an expensive artifact to be
cached. So it goes out of think on regular basis (we should fix that…)
The test ouput was affected by
e706bb41fdb3 as we filtering now happens sooner,
removing for the output.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 19 Nov 2022 01:35:01 +0100] rev 49622
memory-usage: fix `hg log --follow --rev R F` space complexity
When running `hg log --follow --rev REVS FILES`, the log code will walk the
history of all FILES starting from the file revisions that exists in each REVS.
Before doing so, it looks if the files actually exists in the target revisions.
To do so, it opens the manifest of each revision in REVS to look up if we find
the associated items in FILES.
Before this changeset this was done in a way that created a changectx for
each target revision, keeping them in memory while we look into each file.
If the set of REVS is large, this means keeping the manifest for each entry in
REVS in memory. That can be large… if REV is in the form `::X`, this can quickly
become huge and saturate the memory. We have seen usage allocating 2GB per
second until memory runs out.
So this changeset invert the two loop so that only one revision is kept in
memory during the operation. This solve the memory explosion issue.
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 18 Nov 2022 13:47:29 +0000] rev 49621
tests: run many tests in $TESTTMP/repo instead of $TESTTMP
This is useful so we can store other files in $TESTTMP
(in particular tests that use docket files (nodemap, dirstate-v2) keep
file uids in $TESTTMP/UID)
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 18 Nov 2022 13:52:18 +0000] rev 49620
tests: fix the detection of dirstate-v2 in hghave.py
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 17 Nov 2022 14:37:43 +0000] rev 49619
dirstate-v2: do not put the dirstate data file in a transaction,
since the transaction reverts the store, while the dirstate is stored separately
Matt Harbison <matt_harbison@yahoo.com> [Fri, 18 Nov 2022 13:43:03 -0500] rev 49618
commit: properly consider file include and exclude options when closing branch
It looks like this is meant to prevent adding another commit that does nothing
but close a branch on top of a commit that already closed the branch. The
matcher building functions want `Dict[bytes, Any]`, not `Dict[str, Any]`, which
was found by adding type hints to the matcher related methods in scmutil.
Matt Harbison <matt_harbison@yahoo.com> [Fri, 18 Nov 2022 14:03:56 -0500] rev 49617
tests: demonstrate a bug blocking a redundant branch close
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 17 Nov 2022 16:31:52 +0000] rev 49616
tests: stop creating temporary files in TESTDIR
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 06 Nov 2022 15:03:31 -0500] rev 49615
delta-find: adjust the moment when we mark something as "tested"
In a coming change, not all elements of `group` might get tested. So we need to
have more control about when a revision is actually added to the `tested` set.
So we move to a more verbose (and more fragile) version.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 06 Nov 2022 12:53:57 -0500] rev 49614
delta-find: rename a variable for clarity
the index in the delta-chain is also the snapshot depth. So we rename the
variable for clarity.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 06 Nov 2022 12:53:03 -0500] rev 49613
delta-find: small documentation update
This is not a 1-1 mapping, but a 1-n mapping. Lets make the associated comment clearer.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 06 Nov 2022 12:51:50 -0500] rev 49612
delta-find: move pre-filtering with other pre-filtering logic
This is more consistent and will help use to be in a clean state before dealing
with the "too large group" issue.
As a side effect, the debug output now skip some useless cases, making it more useful.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 06 Nov 2022 13:46:08 -0500] rev 49611
delta-find: expand a function definition and call before extendin it
This make the next changeset more compact.
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 17 Oct 2022 22:19:43 +0200] rev 49610
debug: add an option to display statistic about a unbundling operation
This will helps a lot to understand how the bundling decision have actually
impacted pull/unbundle on the other side.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 15 Nov 2022 16:25:23 +0100] rev 49609
debug: add an option to display statistic about a bundling operation
This will helps a lot to understand how the bundling decision might impact
pull/unbundle on the other side.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 15 Nov 2022 18:08:56 +0100] rev 49608
delta-find: add debug information about reuse of cached data
This will help us to understand the behavior of find-delta during a pull.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 08 Nov 2022 18:05:19 -0500] rev 49607
cffi: fix a bytes vs str issue on macOS when listing directories
This code hasn't been touched in recent years, and the other implementation
return bytes for the filename, so I assume this is a holdover from the py2 days.
I was unable to test it on mac though, because the `_osutil` import failed.
Jason R. Coombs <jaraco@jaraco.com> [Wed, 02 Nov 2022 12:54:12 -0400] rev 49606
packaging: refresh dependency hashes (
issue6750)
Also, add some documentation to the `.in` files.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 16 Nov 2022 15:39:10 +0100] rev 49605
matcher: do not prepend '.*' to pattern using ^ after flags
Since the previous commit (fixing wider issue), the code generated strange
regex. This is now fixed and tested.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 16 Nov 2022 16:38:42 +0100] rev 49604
matcher: fix the issue with regex inline-flag in rust oo
Same problem same solution.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 16 Nov 2022 13:05:01 +0100] rev 49603
matcher: fix issues regex flag contained in pattern (
issue6759)
Python 3.11 is now enforcing that flag must be at the beginning of the regex
This creates a serious regression for people using Python 3.11 with an hgignore
using flag in a "relre" pattern.
We now detect any flags in such pattern and "prepend" our ".*" pattern after them.
In addition, we now insert the flag in the regexp to only affect the pattern we
are rewriting. Otherwise, the regex built from the combined pattern would these
flags in the middle of it anyway.
As a side effect of this last change, we fix a bug… before this change regex
flag in a pattern would affect all combined patterns. That was bad and is not
longer the case.
The Rust code needs to be updated to fix that very bug, but we will do it in
another changeset.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 16 Nov 2022 14:40:27 +0100] rev 49602
release: removed the 6.3.0 tag
The revision having two tags confuses some of the build script trying to fetch
the version. So, remove the "bad" tag for now.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 08 Nov 2022 18:05:19 -0500] rev 49601
cffi: fix a bytes vs str issue on macOS when listing directories
This code hasn't been touched in recent years, and the other implementation
return bytes for the filename, so I assume this is a holdover from the py2 days.
I was unable to test it on mac though, because the `_osutil` import failed.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 08 Nov 2022 14:31:10 -0500] rev 49600
typing: fix the typehint for `skip` arg on `osutil.listdir()` to be optional
The cffi and pure implementations both default to `None`, and the args are
parsed in C with `"y#|OO:listdir"`, with the C variable initialized to NULL.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 08 Nov 2022 14:17:56 -0500] rev 49599
typing: add type hints to mpatch implementations
Again, using `merge-pyi` to apply the stubs in cext and then manually type the
private methods. The generated stub without these hints inferred very little,
and the stuff it did was wrong.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 08 Nov 2022 13:59:16 -0500] rev 49598
typing: add type hints to bdiff implementations
Not super important code, but this was an exercise in using `merge-pyi` to fold
type stubs back into the code on something small. The cext stubs don't seem to
be getting used (at least the only thing in `.pytype/pyi/mercurial/cext` after a
run generating the stubs is `__init__.pyi`), so maybe this will help some.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 08 Nov 2022 13:52:46 -0500] rev 49597
cffi: adjust the list returned by bdiff.blocks to never have a None entry
This was flagged by pytype after merging the corresponding bdiff.pyi in cext:
File ".../mercurial/cffi/bdiff.py", line 44, in blocks: bad return type [bad-return-type]
Expected: List[Tuple[int, int, int, int]]
Actually returned: List[None]
AFAICT, all callers immediately unpack the tuple into 4 variables, so a `None`
entry would simply crash if they aren't all overwritten. As long a `count` and
the link list are consistent, this shouldn't be a problem.
This placates both pytype and PyCharm (which complained about the `i` in `rl[i]`
having the wrong type with the old code).
Matt Harbison <matt_harbison@yahoo.com> [Tue, 08 Nov 2022 13:38:06 -0500] rev 49596
typing: fix a syntax error in mercurial/cext/bdiff.pyi
I noticed because `merge-pyi` on the non-cext implementations with this file as
input skipped the return type for this. `pytype-single --parse-pyi` confirmed
it was a problem.
Raphaël Gomès <rgomes@octobus.net> [Mon, 14 Nov 2022 13:35:56 +0100] rev 49595
hg-core: relax dependencies pinning
Being this rigid makes packagers' job more difficult since they might not
carry the exact version. This hard pinning was introduced in
eb02decdf but
wasn't strictly necessary to achieve its compatibility goal.
Anton Shestakov <av6@dwimlabs.net> [Mon, 14 Nov 2022 19:58:44 +0400] rev 49594
tests: make running ls in a no longer existing directory more portable
On Linux, ls -A simply returns nothing and the exit code is 0.
On NetBSD, ls -A complains that . doesn't exist and the exit code is 1.
Sadly, it's not possible to do something like "[1] (?)", so " || true" is the
best I could come up with.
Anton Shestakov <av6@dwimlabs.net> [Mon, 14 Nov 2022 19:38:57 +0400] rev 49593
tests: move some lines inside #if windows-#else block test-removeemptydirs.t
This is done to make it's clear that windows is not affected by this test case,
IOW windows and non-windows platforms are now tested separately, because their
results are very different.
Anton Shestakov <av6@dwimlabs.net> [Mon, 20 Jun 2022 12:53:08 +0400] rev 49592
tests: use ls -A instead of ls -1 in test-removeemptydirs.t
In case the tests are run as root, ls assumes -A by default on some systems
(e.g. NetBSD). Tests probably shouldn't be run as root, but let's use -A just
in case, for convenience.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 15 Nov 2022 10:28:39 +0100] rev 49591
release: add the "6.3" to the 6.3 release
The release was tagged "6.3.0" while the custom have been to omit the third ".0"
for initial release for the history of the project.
For consistency, we add the customary version of the tag to the 6.3 release.
pacien <pacien.trangirard@pacien.net> [Mon, 14 Nov 2022 20:21:53 +0100] rev 49590
tests: fix new git protocol policy in convert-git.t
Recent versions of git restrict the use of the "file" protocol for security
reasons (https://github.com/git/git/commit/a1d4f67).
This broke this test, which failed with the following hidden error:
"fatal: transport 'file' not allowed".
This patch relaxes the git configuration for the test to solve this.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 04 Nov 2022 19:38:47 -0400] rev 49589
debug-delta-find: add a --source option
This will help us to understand the delta-find operation in different
situations.
Jason R. Coombs <jaraco@jaraco.com> [Wed, 02 Nov 2022 09:34:03 -0400] rev 49588
demandimport: ensure lazyloaderex sets loader attributes (
issue6725)
Adds test capturing missed expectation.
Jason R. Coombs <jaraco@jaraco.com> [Tue, 30 Aug 2022 09:59:53 -0400] rev 49587
shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com> [Mon, 29 Aug 2022 14:11:26 -0400] rev 49586
shelve: add Shelf.changed_files for resolving changed files in a plugin
Raphaël Gomès <rgomes@octobus.net> [Mon, 14 Nov 2022 10:59:09 +0100] rev 49585
branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Mon, 14 Nov 2022 10:57:44 +0100] rev 49584
relnotes: add final 6.3 relnotes
Raphaël Gomès <rgomes@octobus.net> [Mon, 14 Nov 2022 10:35:09 +0100] rev 49583
Added signature for changeset
04f1dba53c96
Raphaël Gomès <rgomes@octobus.net> [Mon, 14 Nov 2022 10:34:17 +0100] rev 49582
Added tag 6.3.0 for changeset
04f1dba53c96
Raphaël Gomès <rgomes@octobus.net> [Wed, 09 Nov 2022 23:28:01 -0500] rev 49581
rust: create wrapper struct to reduce `regex` contention issues
Explanations inline.