D12628: worker: fix `_blockingreader.read()` to really block

2022-05-18 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Maybe I'm missing something simple, but the help for `io.BytesIO.readinto` says: Returns number of bytes read (0 for EOF), or None if the object

D12627: worker: adapt _blockingreader to work around a python3.8.[0-1] bug (issue6444)

2022-05-17 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Python 3.8.0 is the latest I can load on Ubuntu 18.04, and I regularly hit the TypeError because this function is missing. While it can be avoided by

D12606: contrib: migrate off of a couple of bitbucket URLs

2022-05-04 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I noticed this when diffing the thg installer against Mercurial to see what was missing. There are a handful of other URLs in i18n and extension example

D12605: diff: add help text to highlight the ability to do "merge diffs"

2022-05-04 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D12605 AFFECTED FILES mercurial/commands.py tests/test-help.t CHANGE DETAILS

D12599: doc: use an absolute path in sys.path to work around a python DLL loading bug

2022-05-02 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This bug[1] was causing the zstd entry under "Available Compression Engines" to be omitted from the documentation for some versions of python3. I could

D12596: wix: bump the minimum Windows required to 8.1

2022-04-28 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY PyOxidizer binaries are built with py 3.9.6, so not even Windows 7 is supported. Unfortunately, there don't appear to be more recent values for newer

D12595: wix: drop python2 conditionals

2022-04-28 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12595 AFFECTED FILES contrib/packaging/wix/mercurial.wxs

D12570: packaging: drop python27 references from the Windows instructions

2022-04-27 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I also diffed these two files and eliminated cosmetic differences to make it easier to ensure both are in alignment. REPOSITORY rHG Mercurial BRANCH

D12571: packaging: fix the type hint on the download_entry function

2022-04-27 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Flagged by PyCharm. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12571 AFFECTED FILES

D12569: packaging: add a missing parenthesis to help text

2022-04-27 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12569 AFFECTED FILES contrib/packaging/hgpackaging/cli.py CHANGE DETAILS

D12568: git: un-byteify the `mode` argument for the builtin `open()`

2022-04-27 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I guess this was assuming `pycompat.open` was imported, but it's not here or elsewhere in the git extension. REPOSITORY

D12567: git: adapt to some recent dirstate API changes

2022-04-27 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY There are still old methods like add() and drop(). I don't see anything that looks equivalent, so there's likely more

D12566: idirstate: add missing get_entry() method

2022-04-27 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12566 AFFECTED FILES mercurial/interfaces/dirstate.py CHANGE DETAILS diff

D12560: contrib: add a hint if the Windows dependency MSI is already installed

2022-04-15 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY In the past, I've gotten confused when the script failed on seemingly random python installs (and thus the py3.8 install was commented out from the last

D12559: contrib: update python dependencies on Windows

2022-04-15 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12559 AFFECTED FILES contrib/install-windows-dependencies.ps1 CHANGE DETAILS

D12556: windows: disable pager when packaged with py2exe

2022-04-13 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY With Windows and py3, all output that got directed to the pager was lost. It can be worked around by the user piping to `more`, but that's easy to forget,

D12557: windows: fix stdio with py2exe and py3

2022-04-13 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY - DO NOT QUEUE THIS ** I have no idea how this is supposed to be fixed for real, but it's likely related to the comment above where stdout is set about

D12555: procutil: avoid `+= None` when writing to full std{err, out} descriptor on py3

2022-04-13 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The write function returns `None` if there was no room to write the given data[1]. I don't like that this is effectively an infinite loop if there's

D12553: setup: fix the py2exe logic to work with py3

2022-04-13 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY TortoiseHg still uses (the modernized) py2exe packaging, but the build was failing since `py2exe.Distribution` was removed. One thing to note is that

D12554: resourceutil: force filesystem access to resources when using py2exe

2022-04-13 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I don't know why it doesn't work, but it avoids this fatal error on startup: > hg debugshell Traceback (most recent call last): File "hg",

D12421: util: drop a duplicate import

2022-03-29 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This was already imported several lines above. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12421

D12423: tests: stop excluding the pycompat module from pyflakes

2022-03-29 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I assume this was skipped because of all of the py2 stuff causing a lot of spew. The "unused" imports are left in place in case any 3rd party stuff is

D12419: util: restore the util.pickle symbol

2022-03-29 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This was accidently dropped in df56e6bd37f6 , which started importing pickle

D12422: tests: drop some py2 specific pyflake failures

2022-03-29 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12422 AFFECTED FILES tests/test-check-pyflakes.t CHANGE DETAILS diff --git

D12420: pycompat: drop the pickle import

2022-03-29 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I suspect this is what df56e6bd37f6 meant to eliminate. REPOSITORY rHG

D12401: pytype: disable a few errors about Windows specific module attributes

2022-03-24 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY These were flagged by pytype 2022.03.21. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12401 AFFECTED

D12400: pytype: drop py3.6 support

2022-03-24 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Pytype 2022.01.07 only supports 3.7+. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12400 AFFECTED FILES

D11971: subrepo: make -S work again on Windows for incoming/outgoing to remote repos

2022-01-10 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY While it worked fine for the top level repo, the remote path for the subrepo got mangled to something like "https://server/prefix\repo\subrepo;, which I've

D11944: setup.py: fix some documentation typos

2021-12-18 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11944 AFFECTED FILES setup.py CHANGE DETAILS diff --git a/setup.py

D11931: pytype: stop excluding ssutil.py

2021-12-15 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Pytype simply can't distinguish the type for this one entry's value from the other values: File "/mnt/c/Users/Matt/hg/mercurial/sslutil.py", line

D11930: pytype: stop excluding wireprotoserver.py

2021-12-15 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The `config` entry is a 2 part tuple, which has `__iter__()`: File "/mnt/c/Users/Matt/hg/mercurial/wireprotoserver.py", line 253, in _availableapis:

D11929: pytype: stop excluding pycompat.py

2021-12-15 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Whatever issues were here seem to have been previously fixed. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11927: pytype: stop excluding procutil.py

2021-12-15 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This avoids these false warnings: File "/mnt/c/Users/Matt/hg/mercurial/utils/procutil.py", line 78, in : No attribute 'register' on

D11928: procutil: avoid an uninitialized variable usage on tempfile exception

2021-12-15 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY If `pycompat.unnamedtempfile()` raises an exception, it would have called `stdin.close()` in the `finally` block without it being initialized first.

D11926: pytype: stop excluding chgserver.py

2021-12-15 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This teaches pytype about some lazy initialization, and avoids the following: File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 666, in

D11922: pytype: stop excluding patch.py

2021-12-14 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The underlying `email.generator.BytesGenerator` is documented as requiring an `fp` that accepts bytes, so I'm not sure why pytype is getting confused:

D11924: pytype: stop excluding webcommands.py

2021-12-14 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I have no idea why, but asserting that each value added to `emptydirs` is not None didn't fix this: File

D11921: pytype: stop excluding statprof.py

2021-12-14 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This seems to have worked fine before (at least on Linux). We could just add suppression comments, but this file already imports from the mercurial

D11923: tests: drop an obsolete comment about a pytype failure

2021-12-14 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11923 AFFECTED FILES tests/test-check-pytype.t CHANGE DETAILS diff --git

D11919: pytype: stop excluding wireprotov2server.py

2021-12-14 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This fixes: File "/mnt/c/Users/Matt/hg/mercurial/wireprotov2server.py", line 584, in _capabilitiesv2: unsupported operand type(s) for item

D11920: statprof: convert a few exception byte strings to str

2021-12-14 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY That way these display without the b'' prefix. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11920

D11918: pytype: stop excluding stringutil.py

2021-12-14 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This fixes the following: File "/mnt/c/Users/Matt/hg/mercurial/utils/stringutil.py", line 267, in prettyrepr: Function bytes.startswith

D11916: pytype: stop excluding copies.py

2021-12-14 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I can't prove that `targetrev` is always in `all_copies`, but it would have been a runtime error before too if it's not. REPOSITORY rHG Mercurial

D11917: pytype: stop excluding cmdutil.py

2021-12-14 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Whatever was broken here seems to have been previously fixed. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11912: pytype: stop excluding changegroup.py

2021-12-14 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The false positives that were detected seem to be related to what happens to the variables after the local methods are used: File

D11915: copies: fix some documentation typos

2021-12-14 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11915 AFFECTED FILES mercurial/copies.py CHANGE DETAILS diff --git

D11914: copies: drop an unused variable

2021-12-14 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11914 AFFECTED FILES mercurial/copies.py CHANGE DETAILS diff --git

D11913: pytype: stop excluding lsprof.py

2021-12-14 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Whatever was previously flagged in this file appears to have been fixed. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11911: pytype: stop excluding upgrade.py

2021-12-14 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The sole failure here was this, which is fixed by simply creating a set like the caller, instead of a dict: File

D11906: hghave: fix the check for suid on platforms lacking support

2021-12-12 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The mac tests were raising an AttributeError without the default arg. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11905: upgrade: byteify a few error messages

2021-12-12 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY These were flagged by pytype (which is currently disabled on this file due to another failure). REPOSITORY rHG Mercurial BRANCH default REVISION

D11805: packaging: bump pygit2 to 1.7.1

2021-11-24 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11805 AFFECTED FILES contrib/packaging/requirements-windows-py3.txt CHANGE

D11804: packaging: bump windows_curses to 2.3.0

2021-11-24 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is required for Python 3.10 support. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11804 AFFECTED

D11803: packaging: regenerate the requirements files with pip-tools 6.4.0

2021-11-24 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Somewhere along the line, the formatting changed. There's no change in package content here- it's just some minor text changes. Py2 doesn't have any

D11719: typing: add more type hints to the errors module

2021-10-23 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY These were found by looking for `Any` types in the generated `*.pyi` file after running the tests. There are some more complicated types that I'm not sure

D11718: typing: add a few assertions to revlog.py to help pytype

2021-10-23 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I've seen this before, but this was seen as potentially `None` with pytype 2021.10.18. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11609: packaging: update the certifi dependency

2021-10-03 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Not sure if this helps with recent certificate issues[1], but we might as well keep this modern. Note that certifi no longer claims py2 support, and

D11476: extensions: prevent a crash on py3 with a `minimumhgversion` str value

2021-09-21 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The expectation is that this field is bytes, but unported extensions are a thing and it shouldn't explode on a bad value. We already do this

D11473: util: eliminate the possibility of returning None from `versiontuple()`

2021-09-21 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This fixes the following error flagged by pytype: File "/mnt/c/Users/Matt/hg/mercurial/extensions.py", line 228, in load: unsupported operand types

D11475: extensions: prevent a crash on py3 when testing a bad extension minimum

2021-09-21 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY A `None` placeholder is populated for each missing component by `util.versiontuple()`, which could safely be used with `>` on py2, but not py3. I guess

D11474: typing: drop annotations on `mercurial/logcmdutil.walkopts` attributes

2021-09-21 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Pytype 2021-09-09 must have learned some things about `@attr`, because while these were presumably required to help it before (c1d0f83d62c4

D11470: util: avoid a name-error warning in the `mmapread` exception handler

2021-09-21 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Newly caught by pytype 2021-09-09. File "/mnt/c/Users/Matt/hg/mercurial/util.py", line 458, in mmapread: Name 'fd' is not defined [name-error]

D11472: archival: force a `CompressionError` to bytes before passing to `error.Abort`

2021-09-21 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I'm not sure what changed before pytype 09-09-2021 (from 04-15-2021), but this started getting flagged. This fixes: File

D11471: parser: force a `ValueError` to bytes before passing to `error.ParseError`

2021-09-21 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I'm not sure what changed before pytype 09-09-2021 (from 04-15-2021), but this started getting flagged. I think there's a pytype bug here, because I don't

D11469: typing: suppress an name-error warning in `mercurial/windows.py`

2021-09-21 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Newly caught by pytype 2021-09-09. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11469 AFFECTED FILES

D11468: typing: suppress an import-error warning in `mercurial/utils/resourceutil.py`

2021-09-21 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Newly caught by pytype 2021-09-09. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11468 AFFECTED FILES

D11467: encoding: force a few Errors to bytes before passing to `error.Abort`

2021-09-21 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I'm not sure what changed before pytype 09-09-2021 (from 04-15-2021), but these started getting flagged. PyCharm also flagged these. This fixes the

D11466: typing: add a fake `__init__()` to bytestr to distract pytype

2021-09-21 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I'm not sure what changed before pytype 09-09-2021 (from 04-15-2021), but these started getting flagged. This wrapping an exception in a `bytestr` pattern

D11455: setup: stop packaging python3.dll and python3X.dll in the wheel distribution

2021-09-19 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Now that exewrapper is smart enough to find the DLLs it needs without help from the build script, backout ed286d150aa8

D11454: exewrapper: find the proper python3X.dll in the registry

2021-09-19 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Previously, we relied on the default library lookup[1], which for us is essentially to look on `PATH`. That has issues- the Python installations are not

D11452: pyoxidizer: add the user site to `sys.path` on macOS

2021-09-17 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This allows 3rd party extensions that are installed with `pip` to be picked up, similar to what we do on Windows. PyOxidizer has a bug that prevents this

D11451: pyoxidizer: don't use in-memory for resources on macOS

2021-09-17 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY When trying to debug something else on macOS, pyoxidized builds were failing with the following message about pywatchman (and then cext.base85 when I

D11354: hg: don't attempt to extend `sys.path` with the user site without `APPDATA`

2021-08-26 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This variable is created by the system and *should* be available, but test-lfs-bundle.t has a test where it is explicitly unset. It wasn't caught before

D11333: windows: degrade to py2 behavior when reading a non-symlink as a symlink

2021-08-22 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY While waiting for the push to hg-committed in WSL to complete, I ran a `phabimport` from Windows and got this traceback: $ hg phabimport 11313 **

D11308: pyoxidizer: add user-site to `sys.path` on Windows

2021-08-18 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is a port of 53221078e0de to Windows to allow pip-installed extensions to

D11307: run-tests: avoid silently switching the hg executable used

2021-08-18 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I noticed an issue testing the installed pyoxidizer binary using `--with-hg` where it would pass more tests than if the tests are run with `--pyoxidized`.

D11303: zeroconf: fix an issue concatenating bytes and str

2021-08-18 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY `bytes(length)` doesn't do what we want, so use `str`. There appear to be a ton more issues in this extension, including: -

D11275: contrib: switch the Windows bootstrap environment to py3.9

2021-08-09 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Use the built in `venv` module instead of `virtualenv` for simplicity, and upgrade to a modern Mercurial that supports py3. One issue here is that

D11274: contrib: comment out the 64-bit py38 dependency installation on Windows

2021-08-09 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Not sure what is going on here, but it appears to not install py3.8 x64 in the usual `C:\hgdev` directory. The x32 installer works fine. I'm assuming this

D11273: contrib: drop python2.7 from the Windows dependency install script

2021-08-09 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY While we aren't quite ready to drop py27 yet, the MS compiler is no longer available from MS (there is a copy on github if it's really needed), and that

D11272: contrib: log the command and args for every process installing windows deps

2021-08-09 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is a little noisier, but makes it simple to debug when things fail. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL

D11240: windows: avoid a bytes vs unicode crash reading passwords on py2

2021-08-02 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This broke in 5b3513177f2b . Specifically, after typing in the password on py2,

D11235: typing: add several assertions to dirstatemap to appease pytype

2021-07-29 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I think it's been mentioned in IRC that these can't be None in this case. This fixes: File "/mnt/c/Users/Matt/hg/mercurial/dirstatemap.py", line

D11206: typing: convert an annotation to an assertion in commands.py

2021-07-21 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Pytype was happy with the annotation at one point, but 2021.04.15 now complains. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D11207: upgrade: byteify an i18n message

2021-07-21 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11207 AFFECTED FILES mercurial/upgrade_utils/engine.py CHANGE DETAILS diff

D11036: doc: wrap the help text for the purge extension

2021-07-09 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Not sure why `black` or some other checker didn't complain about this. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10895: purge: restore the `testedwith` declaration

2021-06-22 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Otherwise, this extension gets highlighted as a 3rd party extension when an exception occurs. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL

D10876: typing: suppress a false error in mercurial/revlogutils/docket.py on py2

2021-06-12 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY `ord()` wants bytes or str on py3, so I'm guessing it got confused by passing a single byte instead of a one byte string. But this seems to work on 2.7.18

D10873: py3: byteify the version string passed to the deprecation warning method

2021-06-11 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The other callers were already correct. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10873 AFFECTED FILES

D10875: revlog: byteify a few error strings

2021-06-11 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10875 AFFECTED FILES mercurial/revlog.py

D10874: revlog: fix a typo closing the wrong file

2021-06-11 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Caught by pytype as possibly being None, but the file is closed in the previous conditional. REPOSITORY rHG Mercurial

D10872: urlutil: byteify several localized messages

2021-06-11 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Flagged by pytype. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10872 AFFECTED FILES

D10871: urlutil: use the deprecation warning function on the `ui` object

2021-06-11 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY PyCharm flagged this as not existing, and I suspect a copy/paste error. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10870: typing: disable warnings for a couple of Windows specific attributes

2021-06-11 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D10870 AFFECTED FILES mercurial/windows.py CHANGE DETAILS diff --git

D10763: tests: partially fix test-transaction-rollback-on-revlog-split.t on Windows

2021-05-20 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY For whatever reason, the extra space causes different output on Windows: $ printf '% 20d' '1' | xxd - 000: 2020 2020 2020 2020 2020 2020 2020

D10762: tests: fix test-transaction-safety.t on Windows

2021-05-20 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Mostly this is about `C:\dir\sub` style paths being turned into `C:dirsub` by MSYS, and not being about to execute shell scripts in hooks directly. See

D10760: run-tests: enable color on Windows

2021-05-20 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY In setting up the CI for Windows on heptapod, I noticed it was complaining about color not being enabled because pygments wasn't installed- even though it

D10761: run-tests: disable color in 'auto' mode on Windows if stdout is redirected

2021-05-20 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10761 AFFECTED FILES tests/run-tests.py CHANGE DETAILS diff --git

D10759: tests: monkeypatch `util.get_password()` to avoid deadlocks on Windows

2021-05-20 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This should have been part of 5b3513177f2b . REPOSITORY rHG Mercurial BRANCH

D10756: exewrapper: avoid directly linking against python3X.dll

2021-05-20 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Subsequent code calls `LoadLibrary()` to attempt to load the DLL, but because of this symbol reference, there is an attempt to load the DLL used during the

  1   2   3   4   5   6   7   8   9   10   >