Pulkit Goyal <7895pulkit@gmail.com> [Wed, 02 Dec 2020 13:55:17 +0530] rev 46083
procutils: don't try to get `.buffer` if sys.stdin is None
While hunting down following test failure of test-chg.t on Python 3, I stumbled
the case when `.buffer` is not available as sys.stdin is None.
--- /home/pulkit/repo/hg-committed/tests/test-chg.t
+++ /home/pulkit/repo/hg-committed/tests/test-chg.t.err
@@ -203,7 +203,31 @@
$ CHGDEBUG=1 chg version -q 0<&-
chg: debug: * stdio fds are missing (glob)
chg: debug: * execute original hg (glob)
- Mercurial Distributed SCM * (glob)
+ Traceback (most recent call last):
+ File "/tmp/hgtests.avspvsq4/install/bin/hg", line 43, in <module>
+ dispatch.run()
+ File "/usr/lib/python3.6/importlib/util.py", line 233, in
__getattribute__
+ self.__spec__.loader.exec_module(self)
+ File "<frozen importlib._bootstrap_external>", line 678, in
exec_module
+ File "<frozen importlib._bootstrap>", line 219, in
_call_with_frames_removed
+ File
"/tmp/hgtests.avspvsq4/install/lib/python/mercurial/dispatch.py", line
726, in <module>
+ class lazyaliasentry(object):
+ File
"/tmp/hgtests.avspvsq4/install/lib/python/mercurial/dispatch.py", line
737, in lazyaliasentry
+ @util.propertycache
+ File "/usr/lib/python3.6/importlib/util.py", line 233, in
__getattribute__
+ self.__spec__.loader.exec_module(self)
+ File "<frozen importlib._bootstrap_external>", line 678, in
exec_module
+ File "<frozen importlib._bootstrap>", line 219, in
_call_with_frames_removed
+ File "/tmp/hgtests.avspvsq4/install/lib/python/mercurial/util.py",
line 3473, in <module>
+ f=procutil.stderr,
+ File "/usr/lib/python3.6/importlib/util.py", line 233, in
__getattribute__
+ self.__spec__.loader.exec_module(self)
+ File "<frozen importlib._bootstrap_external>", line 678, in
exec_module
+ File "<frozen importlib._bootstrap>", line 219, in
_call_with_frames_removed
+ File
"/tmp/hgtests.avspvsq4/install/lib/python/mercurial/utils/procutil.py",
line 127, in <module>
+ stdin = sys.stdin.buffer
+ AttributeError: 'NoneType' object has no attribute 'buffer'
+ [1]
server lifecycle
----------------
Differential Revision: https://phab.mercurial-scm.org/D9500
Martin von Zweigbergk <martinvonz@google.com> [Wed, 09 Dec 2020 09:54:49 -0800] rev 46082
share: remove unexpected heading from "verbose" container in help test
`test-gendoc-*.t` have been failing for me since
91425656e2b1 (share:
add documentation about share-safe mode in `hg help -e share`,
2020-11-27) with this kind of output:
```
--- /usr/local/google/home/martinvonz/hg/tests/test-gendoc-ru.t
+++ /usr/local/google/home/martinvonz/hg/tests/test-gendoc-ru.t.err
@@ -2,3 +2,9 @@
$ $TESTDIR/check-gendoc ru
checking for parse errors
+ gendoc.txt:12818: (SEVERE/4) Unexpected section title.
+
+ Sharing requirements and configs of source repository with shares
+ -----------------------------------------------------------------
+ Exiting due to level-4 (SEVERE) system message.
+ [1]
```
This patch fixes that.
Differential Revision: https://phab.mercurial-scm.org/D9552
Mads Kiilerich <mads@kiilerich.com> [Thu, 03 Dec 2020 22:49:01 +0100] rev 46081
bugzilla: pass the url to xmlrpclib.ServerProxy as str
Mads Kiilerich <mads@kiilerich.com> [Thu, 03 Dec 2020 22:49:01 +0100] rev 46080
bugzilla: fix reporting of exceptions with py3
Yuya Nishihara <yuya@tcha.org> [Thu, 03 Dec 2020 18:42:23 +0900] rev 46079
ui: remove excessive strtolocal() from debuguigetpass
ui.getpass() returns Optional[bytes], and strtolocal(bytes) would crash.
Follows up
07b0a687c01a "ui: ensure `getpass()` returns bytes."
Joerg Sonnenberger <joerg@bec.de> [Tue, 08 Dec 2020 23:01:24 +0100] rev 46078
cext: match format string for 32bit long platforms
Differential Revision: https://phab.mercurial-scm.org/D9546
Martin von Zweigbergk <martinvonz@google.com> [Tue, 08 Dec 2020 13:33:40 -0800] rev 46077
status: disable morestatus when using -0
Without this patch, you get something like this:
```
M a\x00? a.orig\x00# The repository is in an unfinished *merge* state. (esc)
# Unresolved merge conflicts:
#
# a
#
# To mark files as resolved: hg resolve --mark FILE
# To continue: hg commit
# To abort: hg merge --abort
```
That doesn't seem like something one would ever want. I considered
making it an error to combine `-0` with morestatus, but it seems very
likely that that would just make the user spend time trying to figure
out how to disable morestatus, so it feels like we might as well just
do it for them.
Differential Revision: https://phab.mercurial-scm.org/D9545
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 06 Dec 2020 14:45:19 +0100] rev 46076
debugdiscovery: display some information about the initial "undecided" set
The size and shape of the revision that remains "undediced" once the fetched the
remote heads and queried the local one have a large impact on the discovery
performance, so we display some information about that set.
Differential Revision: https://phab.mercurial-scm.org/D9530
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 06 Dec 2020 06:19:15 +0100] rev 46075
debugdiscovery: add some data about the shapes of the sets
We display the number of heads and roots or the common and missing set.
Differential Revision: https://phab.mercurial-scm.org/D9529
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Dec 2020 21:44:00 -0500] rev 46074
tests: conditionalize the progress timestamp for Windows
It looks like for py2 on Windows, the start date is 1970. It matches the other
platforms for py3, so I'm just going to match the tests and move on, given that
py2 is on the way out.
Differential Revision: https://phab.mercurial-scm.org/D9541
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Dec 2020 20:38:00 -0500] rev 46073
tests: conditionalize a few Windows specific error messages
Differential Revision: https://phab.mercurial-scm.org/D9540
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Dec 2020 20:32:05 -0500] rev 46072
tests: correct the output order about starting a background thread for Windows
I didn't track down where this change occurred. I assume it's related to some
buffering changes, and/or an explicit flush somewhere.
Differential Revision: https://phab.mercurial-scm.org/D9539
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Dec 2020 20:57:50 -0500] rev 46071
tests: update the exit status codes for Windows specific tests
This corresponds to
527ce85c2e60,
ebee234d952a, and
568c05d8f3d2.
Differential Revision: https://phab.mercurial-scm.org/D9538
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Dec 2020 20:53:01 -0500] rev 46070
tests: drop the trailing exclamation point from some Windows abort messages
This likely goes with
95c4cca641f6.
Differential Revision: https://phab.mercurial-scm.org/D9537
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Dec 2020 16:37:22 -0500] rev 46069
tests: update output for test-check-pylint.t
The py3 version on Windows appends "(previous run: 10.00/10, +0.00)" with py39.
I didn't see that for the exact same version on Linux (with py3.6.9).
Differential Revision: https://phab.mercurial-scm.org/D9536
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Dec 2020 16:32:30 -0500] rev 46068
run-tests: extend PATH on Windows to include user installed scripts
This allows the test environment to see pylint.exe when installed with
`pip install --user`, since it isn't normally on PATH.
Differential Revision: https://phab.mercurial-scm.org/D9535
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Dec 2020 16:18:28 -0500] rev 46067
run-tests: stuff a `python3.exe` into the test bin directory on Windows
Windows doesn't have `python3.exe` as part of the python.org distribution, and
that broke every script with a shebang after
c102b704edb5. Windows itself
provides a `python3.exe` app execution alias[1], but it is some sort of reparse
point that MSYS is incapable of handling[2]. When run by MSYS, it simply prints
$ python3 -V
- Cannot open
That in turn caused every `hghave` check, and test that invokes shebang scripts
directly, to fail. Rather than try to patch up every script call to be invoked
with `$PYTHON` (and regress when non Windows developers forget), copying the
executable into the test binary directory with the new name just works. Since
this directory is prepended to the system PATH value, it also overrides the
broken execution alias. (The `_tmpbindir` is used instead of `_bindir` because
the latter causes python3.exe to be copied into the repo next to hg.exe when
`test-run-tests.t` runs. Something runs with this version of the executable and
subsequent runs of `run-tests.py` inside `test-run-tests.t` try to copy over it
while it is in use, and fail. This avoids the failures and the clutter.)
I didn't conditionalize this on py3 because `python3.exe` needs to be present
(for the shebangs) even when running py2 tests. It shouldn't matter to these
simple scripts, and I think the intention is to make the test runner use py3
always, even if testing a py2 build. For now, still supporting py2 is helping
to clean up the mess that is py3 tests.
[1] https://stackoverflow.com/a/
57168165
[2] https://stackoverflow.com/questions/
59148628/solved-unable-to-run-python-3-7-on-windows-10-permission-denied#comment
104524397_
59148666
Differential Revision: https://phab.mercurial-scm.org/D9543
Matt Harbison <matt_harbison@yahoo.com> [Mon, 07 Dec 2020 23:15:35 -0500] rev 46066
run-tests: fix a typo in an attribute name
At least, I assume it's a typo. Nothing else uses it, but `_tmpbindir` is used.
Differential Revision: https://phab.mercurial-scm.org/D9542
Yuya Nishihara <yuya@tcha.org> [Mon, 07 Dec 2020 20:12:36 +0900] rev 46065
test-extension: flush diagnostic message to stabilize chg output
Since chg server may create new file object for the attached stdout,
procutil.stdout is not ui.fout and the buffered procutil.stdout data wouldn't
be flushed at all. That's why test-extension.t passes without modification
on Python 2.
Matt Harbison <matt_harbison@yahoo.com> [Thu, 03 Dec 2020 01:45:23 -0500] rev 46064
formatting: re-blacken match.py
Differential Revision: https://phab.mercurial-scm.org/D9512
Joerg Sonnenberger <joerg@bec.de> [Mon, 07 Dec 2020 11:23:34 +0100] rev 46063
transaction: windows workaround for missing line iteration support
The mixedfilemodewrapper doesn't support line iteration, so just read
the whole file in one go.
Differential Revision: https://phab.mercurial-scm.org/D9532
Joerg Sonnenberger <joerg@bec.de> [Sat, 28 Nov 2020 15:04:44 +0100] rev 46062
sidedata: send the correct revision data for wireproto v2
When no sidedata is present, rawdata() and revision() are the same. But
as soon as sidedata is present, the way it is currently stored will
change the rawdata and that is not desired here, so switch to the
correct data accessor.
Differential Revision: https://phab.mercurial-scm.org/D9445
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 06 Dec 2020 14:45:04 +0100] rev 46061
debugdiscovery: move various computation earlier
We are about to add more data to debug discovery (eg: data bout the initial
undecided set, number of roundtrip, etc). So we start by cleaning up the code by
spliting some computation and some display related preparation.
Differential Revision: https://phab.mercurial-scm.org/D9524
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 06 Dec 2020 06:23:26 +0100] rev 46060
debugdiscovery: clarify internal key name in debugobsolete
They were probably clear when they got added initially but with more key around,
they gain to be clearer.
Differential Revision: https://phab.mercurial-scm.org/D9528