Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 11 Jul 2022 23:59:34 +0200] rev 49407
bundlespec: add documentation about existing option
We have some documentation, lets make it complete.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 27 Jul 2022 12:07:18 +0200] rev 49406
debug-discovery: apply spelling fixes from Raphaël
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Jul 2022 11:10:43 +0200] rev 49405
tree-discovery: fix the request debug output and progress location
This is now associated with each request.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Jul 2022 10:48:06 +0200] rev 49404
debug-discovery: deal with case where common is empty
This code was previously confused by case where:
`heads_common == {nullid}`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Jul 2022 10:39:27 +0200] rev 49403
debug-discovery: do not abort on unrelated repositories
This is a useful case to consider, so we should not abort in this case.
A warning is still issued.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Jul 2022 10:34:20 +0200] rev 49402
debug-discovery: gather the right number of roundtrips for tree discovery
We where not counting the right amount of request before.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Jul 2022 10:04:06 +0200] rev 49401
debug-discovery: also gather details on tree-discovery queries type
This is useful to understand the algorithm.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Jul 2022 04:56:29 +0200] rev 49400
debug-discovery: properly apply remote filtering in "old" mode
Before this change using `--remote-as-revs` with `--old` had no effect and
everything was considered as "common", which is really not what we intended.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Jul 2022 04:54:59 +0200] rev 49399
debug-discovery: fix a typo in the doc
The second option should be `--remote-…` as we just talked about `--local-…`
already.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 19 Jul 2022 18:40:20 -0400] rev 49398
packaging: bump dulwich to 0.20.45
I'm told the new dulwich avoids hg-git test failures.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 19 Jul 2022 18:33:26 -0400] rev 49397
packaging: update keyring on Windows to avoid spurious stacktraces
When challenged for a network password, this would spew on Windows before it
actually used the stored password:
```
Error initializing plugin EntryPoint(name='libsecret', value='keyring.backends.libsecret', group='keyring.backends').
Traceback (most recent call last):
File "keyring.backend", line 198, in _load_plugins
init_func = ep.load()
File "importlib.metadata", line 77, in load
module = import_module(match.group('module'))
File "importlib", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'keyring.backends.libsecret'
Error initializing plugin EntryPoint(name='macOS', value='keyring.backends.macOS', group='keyring.backends').
Traceback (most recent call last):
File "keyring.backend", line 198, in _load_plugins
init_func = ep.load()
File "importlib.metadata", line 77, in load
module = import_module(match.group('module'))
File "importlib", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'keyring.backends.macOS'
```
We're kinda threading a needle here because the next version of `keyring`
(currently at 23.7.0) requires `importlib-metadata` 3.6+, which PyOxidizer 0.22
doesn't support[1].
[1] https://github.com/indygreg/PyOxidizer/issues/609
Matt Harbison <matt_harbison@yahoo.com> [Mon, 18 Jul 2022 19:18:00 -0400] rev 49396
setup: use the full executable manifest from `python.exe`
The manifest embedded by the build process (before the string here is added)
already accounts for the `<requestedExecutionLevel level="asInvoker" ...>`
setting. (Note that the PyOxidizer build is missing this, so it will likely
trigger the UAC escalation prompt on each run.) However, using `mt.exe` to
merge the fragment with what is already in the manifest seems to strip all
whitespace, making it unreadable.
Since Mercurial can be run via `python.exe`, it makes sense that we would have
the same manifest settings (like the supported OS list), though I'm unaware of
any functionality this enables. It also has the nice effect of making the
content readable from a resource editor. The manifest comes from python 3.9.12.
Note that this seems to strip the `<?xml ... ?>` declaration when viewed with
ResourceHacker 5.1.7, but this was also the state of things with the previous
commit, and `mt.exe "-inputresource:hg.exe;#1" -out:extracted` does contain the
declaration and the BOM in both cases. No idea why this differs from other
executables.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 18 Jul 2022 17:19:56 -0400] rev 49395
setup: unconditionally enable the `long-paths-support` option on Windows
I don't see anything talking about why this was experimental in the first place,
but maybe it was concern about the level of python2 support for it. But now,
both `python.exe` and the PyOxidizer build of `hg.exe` have a manifest that
enables it, so leaving it off would mean some Mercurial installations could
operate on a repo with long paths, and others couldn't. Note that only the wide
character functions (XxxW) will have the length restriction lifted.
Sadly, distutils applies `/MANIFEST:EMBED` to the linker in a way that can't
easily be turned off, so we can't use `/MANIFESTFILE` with `extra_preargs` on
`link_executable`. Fortunately, the compiler object provides a path to the
`mt.exe` it found during initialization, because the previous incarnation seems
to have assumed it is being run within an activated Visual Studio environment.
That causes MSYS builds to fail, and probably would have broke the CI
environment.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 18 Jul 2022 17:00:59 -0400] rev 49394
setup: stop shadowing the builtin `dir` symbol
I hit this when debugging what's available on the compiler.
derekbrowncmu@gmail.com [Mon, 18 Jul 2022 03:29:53 -0400] rev 49393
subrepo: avoid opening console window for non-native subrepos on Windows
Prevent annoying command prompt windows popping up when using TortoiseHG with
Git and SVN subrepos by passing creationflags=subprocess.CREATE_NO_WINDOW to
subprocess.Popen.
Georges Racinet <georges.racinet@octobus.net> [Tue, 19 Jul 2022 12:41:46 +0200] rev 49392
mergestate: action name was str
Apparently the standard for them is still to use byte strings.
Found while looking at something else
Matt Harbison <matt_harbison@yahoo.com> [Wed, 13 Jul 2022 17:13:33 -0400] rev 49391
ci: bump pytype to 2022.03.29
This is as far as we can go without running into issues with the vendored `attr`
package. I tried updating that to the latest, and not only did it not fix the
issue, but test-util.py failed due to some poking at `attr` internals that
apparently is no longer valid.
The `libcst` package is now pinned to what I have locally because trying to
install the latest (0.4.7) complains that it can't find the Rust compiler. We
should probably use a requirements file instead (and/or figure out why it can't
find the Rust compiler), but I don't feel like dealing with another side quest.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 13 Jul 2022 12:47:40 -0400] rev 49390
typing: suppress a few attribute errors in url.py
These are newly detected by pytype 2022.03.21. Not sure what is going on here-
`realhostport` and `headers` are added outside of the constructor, so that makes
sense. But PyCharm also thinks the private methods don't exist, though when
clicking through the class hierarchy, it shows in the py3.9 source code.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 13 Jul 2022 11:30:13 -0400] rev 49389
typing: suppress a few pyi-errors with more recent pytype
Not sure what's going on here, but these were flagged with pytype 2022.03.21.
We can't update to something much more recent, because newer versions complain
about various `attr` uses.
Ondrej Pohorelsky <opohorel@redhat.com> [Wed, 13 Jul 2022 18:27:40 +0200] rev 49388
sslutil: another use proper attribute to select python 3.7+
The previous attribute was python 3.6+, but guarded a python 3.7+ block
Using the correct attribute avoids:
+ File "/tmp/hgtests.bc0_uk2d/install/lib/python/mercurial/sslutil.py", line 577, in wrapserversocket
+ sslcontext.minimum_version = ssl.TLSVersion.TLSv1_1
+ AttributeError: module 'ssl' has no attribute 'TLSVersion'
Mathias De Mare <mathias.de_mare@nokia.com> [Tue, 12 Jul 2022 15:59:53 +0200] rev 49387
sslutil: use proper attribute to select python 3.7+
The previous attribute was python 3.6+, but guarded a python 3.7+ block.
Using the correct attribute avoids:
File "/usr/lib64/python3.6/site-packages/mercurial/sslutil.py", line 334, in wrapsocket
sslcontext.minimum_version = ssl.TLSVersion.TLSv1_1
AttributeError: module 'ssl' has no attribute 'TLSVersion'
Anton Shestakov <av6@dwimlabs.net> [Wed, 06 Jul 2022 11:52:26 +0400] rev 49386
git: copy findmissingrevs() from revlog.py to gitlog.py (
issue6472)
Anton Shestakov <av6@dwimlabs.net> [Mon, 04 Jul 2022 17:16:13 +0400] rev 49385
git: add a missing reset_copy keyword argument to dirstate.set_tracked()
Since nothing else in hgext/git supports copies yet, the best I can do is avoid
TypeError: set_tracked() got an unexpected keyword argument 'reset_copy'.
Anton Shestakov <av6@dwimlabs.net> [Mon, 04 Jul 2022 15:01:52 +0400] rev 49384
git: make sure to fsdecode bookmark names everywhere (
issue6723)
Ondrej Pohorelsky <opohorel@redhat.com> [Wed, 13 Jul 2022 18:27:40 +0200] rev 49383
sslutil: another use proper attribute to select python 3.7+
The previous attribute was python 3.6+, but guarded a python 3.7+ block
Using the correct attribute avoids:
+ File "/tmp/hgtests.bc0_uk2d/install/lib/python/mercurial/sslutil.py", line 577, in wrapserversocket
+ sslcontext.minimum_version = ssl.TLSVersion.TLSv1_1
+ AttributeError: module 'ssl' has no attribute 'TLSVersion'
Mathias De Mare <mathias.de_mare@nokia.com> [Tue, 12 Jul 2022 15:59:53 +0200] rev 49382
sslutil: use proper attribute to select python 3.7+
The previous attribute was python 3.6+, but guarded a python 3.7+ block.
Using the correct attribute avoids:
File "/usr/lib64/python3.6/site-packages/mercurial/sslutil.py", line 334, in wrapsocket
sslcontext.minimum_version = ssl.TLSVersion.TLSv1_1
AttributeError: module 'ssl' has no attribute 'TLSVersion'
Raphaël Gomès <rgomes@octobus.net> [Mon, 11 Jul 2022 09:54:40 +0200] rev 49381
branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Mon, 11 Jul 2022 09:50:32 +0200] rev 49380
Added signature for changeset
094a5fa3cf52
Raphaël Gomès <rgomes@octobus.net> [Mon, 11 Jul 2022 09:50:13 +0200] rev 49379
Added tag 6.2 for changeset
094a5fa3cf52
Manuel Jacob <me@manueljacob.de> [Mon, 11 Jul 2022 01:51:20 +0200] rev 49378
procutil: make stream detection in make_line_buffered more correct and strict
In make_line_buffered(), we don’t want to wrap the stream if we know that lines
get flushed to the underlying raw stream already.
Previously, the heuristic was too optimistic. It assumed that any stream which
is not an instance of io.BufferedIOBase doesn’t need wrapping. However, there
are buffered streams that aren’t instances of io.BufferedIOBase, like
Mercurial’s own winstdout.
The new logic is different in two ways:
First, only for the check, if unwraps any combination of WriteAllWrapper and
winstdout.
Second, it skips wrapping the stream only if it is an instance of io.RawIOBase
(or already wrapped). If it is an instance of io.BufferedIOBase, it gets
wrapped. In any other case, the function raises an exception. This ensures
that, if an unknown stream is passed or we add another wrapper in the future,
we don’t wrap the stream if it’s already line buffered or not wrap the stream
if it’s not line buffered. In fact, this was already helpful during development
of this change. Without it, I possibly would have forgot that WriteAllWrapper
needs to be ignored for the check, leading to unnecessary wrapping if stdout is
unbuffered.
The alternative would have been to always wrap unknown streams. However, I
don’t think that anyone would benefit from being less strict. We can expect
streams from the standard library to be subclassing either io.RawIOBase or
io.BufferedIOBase, so running Mercurial in the standard way should not regress
by this change. Py2exe might replace sys.stdout and sys.stderr, but that
currently breaks Mercurial anyway and also these streams don’t claim to be
interactive, so this function is not called for them.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 05 Jul 2022 17:53:26 +0200] rev 49377
repo-upgrade: avoid a crash when multiple optimisation are specified
In Python 3, the type are no longer comparable and this expose the error.
Raphaël Gomès <rgomes@octobus.net> [Wed, 25 May 2022 18:29:21 +0200] rev 49376
rust: remove excessive calls to `#[timed]`
This makes trace output *really* noisy and is only useful in case you want to
take a look at a single revlog.
This is easy to add back on a case-by-case basis and does not need to stay with
the more permanent timers.
Raphaël Gomès <rgomes@octobus.net> [Wed, 25 May 2022 16:50:00 +0200] rev 49375
rhg: add error message for paths outside the repository when cwd != root
This mirrors the Python implementation.
The relative path handling should probably be refactored into a util, but it
it out of scope for this change.
Raphaël Gomès <rgomes@octobus.net> [Wed, 18 May 2022 15:53:28 +0100] rev 49374
rust: don't swallow valuable error information
This helps when diagnosing corruption, and is in general good practice. The
information is here, valuable and can be used easily.
Raphaël Gomès <rgomes@octobus.net> [Wed, 18 May 2022 09:50:39 +0100] rev 49373
rust: add message to `DirstateV2ParseError` to give some context
This is useful when debugging.
Ian Moody <moz-ian@perix.co.uk> [Sun, 12 Jun 2022 16:04:57 +0100] rev 49372
py3: stop using deprecated Element.getchildren() method in convert/darcs
This has been deprecated since py3.2, and removed entirely in py3.9
Ian Moody <moz-ian@perix.co.uk> [Sun, 12 Jun 2022 16:01:31 +0100] rev 49371
py3: fix bytes/unicode issues in convert/darcs
- don't check for a binary symbol in globals(), which meant it always thought
the module wasn't available
- don't pass bytes to stdlib methods
- return bytes in getchanges where Mercurial expects to see them
Ian Moody <moz-ian@perix.co.uk> [Wed, 15 Jun 2022 01:01:02 +0100] rev 49370
convert: remove old ElementTree import cruft from darcs
All the `import elementtree` attempts seem to pre-date py2.5, when it was
brought into the standard library, and the manual `cElementTree` fast
implementation import has been unnecessary and deprecated since py3.3.
Raphaël Gomès <rgomes@octobus.net> [Thu, 16 Jun 2022 20:44:52 +0200] rev 49369
relnotes: add 6.2rc0
Raphaël Gomès <rgomes@octobus.net> [Thu, 16 Jun 2022 18:07:09 +0200] rev 49368
Added signature for changeset
288de6f5d724
Raphaël Gomès <rgomes@octobus.net> [Thu, 16 Jun 2022 18:06:55 +0200] rev 49367
Added tag 6.2rc0 for changeset
288de6f5d724
Raphaël Gomès <rgomes@octobus.net> [Thu, 16 Jun 2022 15:28:54 +0200] rev 49366
branching: merge default into stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 16 Jun 2022 15:20:48 +0200] rev 49365
branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Thu, 16 Jun 2022 15:15:03 +0200] rev 49364
relnotes: add 6.1.3 and 6.1.4
Raphaël Gomès <rgomes@octobus.net> [Thu, 16 Jun 2022 15:09:59 +0200] rev 49363
Added signature for changeset
0cc5f74ff7f0
Raphaël Gomès <rgomes@octobus.net> [Thu, 16 Jun 2022 15:09:46 +0200] rev 49362
Added tag 6.1.4 for changeset
0cc5f74ff7f0
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 11 Jun 2022 00:26:25 +0200] rev 49361
sparse: use the rust code even when sparse is present
With rust supporting more matcher types, we can now take this route in the
sparse case too.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 10 Jun 2022 23:19:04 +0200] rev 49360
sparse: directly inline the `set_tracked` and `copy` wrapping
core is already aware of sparse, so lets move the handful of line of code that
deal with this for the sake of simplicity and explicitness.