D8343: tests: perform grep manually in test-doctest.py

2020-04-01 Thread indygreg (Gregory Szorc)
Closed by commit rHG15aef805619d: tests: perform grep manually in test-doctest.py (authored by indygreg). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial

D8339: dispatch: force \n for newlines on sys.std* streams (BC)

2020-04-01 Thread indygreg (Gregory Szorc)
Closed by commit rHG02fa5392bab6: dispatch: force \n for newlines on sys.std* streams (BC) (authored by indygreg). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG

D8341: tests: force \n newlines when writing to sys.stdout

2020-04-01 Thread indygreg (Gregory Szorc)
Closed by commit rHGd359f0d1a3d3: tests: force \n newlines when writing to sys.stdout (authored by indygreg). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial

D8338: hook: move stdio redirection to context manager

2020-04-01 Thread indygreg (Gregory Szorc)
Closed by commit rHG3cbbfd0bfc17: hook: move stdio redirection to context manager (authored by indygreg). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial

D8337: pycompat: change argv conversion semantics

2020-04-01 Thread indygreg (Gregory Szorc)
Closed by commit rHG00e0c5c06ed5: pycompat: change argv conversion semantics (authored by indygreg). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial CHANGES

D8336: tests: use `f --hexdump` to print file content

2020-04-01 Thread indygreg (Gregory Szorc)
Closed by commit rHGda9b7f9635a2: tests: use `f --hexdump` to print file content (authored by indygreg). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial

D8350: hgcli: add stub PyOxidizer project

2020-04-01 Thread indygreg (Gregory Szorc)
Closed by commit rHGaf739894a4c1: hgcli: add stub PyOxidizer project (authored by indygreg). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial CHANGES SINCE LAST

D8351: hgcli: customize for Mercurial

2020-04-01 Thread indygreg (Gregory Szorc)
Closed by commit rHGbc847878f4c0: hgcli: customize for Mercurial (authored by indygreg). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial CHANGES SINCE LAST

D8335: url: pass str to pathname2url

2020-04-01 Thread indygreg (Gregory Szorc)
Closed by commit rHGe74af49aa3c9: url: pass str to pathname2url (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8335?vs=20901=20940 CHANGES SINCE LAST ACTION

D8334: tests: pass str to matchoutput()

2020-04-01 Thread indygreg (Gregory Szorc)
Closed by commit rHG51ffb2a6c08a: tests: pass str to matchoutput() (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8334?vs=20900=20939 CHANGES SINCE LAST

D8349: hgcli: remove legacy project

2020-04-01 Thread indygreg (Gregory Szorc)
Closed by commit rHG02f66b23cba3: hgcli: remove legacy project (authored by indygreg). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial CHANGES SINCE LAST

D8350: hgcli: add stub PyOxidizer project

2020-03-31 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Using commit c772a1379c3026314eda1c8ea244b86c0658951d of PyOxidizer, I ran `pyoxidizer init-rust-project hgcli` to create a stub Rust project. The only

D8351: hgcli: customize for Mercurial

2020-03-31 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Now that we have a shiny new PyOxidizer-based hgcli project, let's customize it for Mercurial! This commit replaces the auto-generated pyoxidizer.bzl with

D8352: extensions: don't crash if __file__ not defined

2020-03-31 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This attribute isn't present in PyOxidizer when loading modules from memory. Before, this code was crashing under PyOxidizer. After, it simply yields

D8349: hgcli: remove legacy project

2020-03-31 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This code is a logical precursor to PyOxidizer. It is now defunct. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D8340: dispatch: force \n for newlines on sys.std* streams (BC)

2020-03-29 Thread indygreg (Gregory Szorc)
indygreg added a comment. indygreg abandoned this revision. This is a dupe of D8339 . REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8340/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8340 To: indygreg,

D8344: extensions: refactor function for obtaining disabled extension help

2020-03-29 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The way this worked before was hgext.__index__ was consulted. This file appears to only be present on some Windows distributions. This file contains a dict

D8348: tests: force newlines to LF in inline Python script

2020-03-29 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Like we've done in what seems like an infinite stream of random scripts, we need to set sys.stdout to normalize to LF on Python 3 on Windows or else CRLF can

D8345: tests: look for CRLF on Windows

2020-03-29 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: durin42. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The ui.editor code calls util.tonativeeol() to normalize line endings to the platform native format. So, editor files may have

D8347: encoding: use special dictionary type for env variables on Windows

2020-03-29 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Environment variables on Windows are case insensitive and Python internally uses a special dict type that normalizes all keys to uppercase. Our custom

D8346: tests: force newlines to LF in tinyproxy.py

2020-03-29 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Yet another instance where we need to replace the sys.std* streams to prevent CRLF from creeping in on Windows. REPOSITORY rHG Mercurial BRANCH default

D8342: tests: prevent printing \r to stdout

2020-03-29 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Like we've done in other recent commits, we need to change sys.stdout on Python 3 to not use os.linesep so output is consistent on Python 3 on Windows.

D8343: tests: perform grep manually in test-doctest.py

2020-03-29 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This test has been failing on Windows since 0af56d3ee24c introduced the `hg files`

D8340: dispatch: force \n for newlines on sys.std* streams (BC)

2020-03-29 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The sys.std* streams behave differently on Python 3. On Python 3, these streams are an io.TextIOWrapper that wraps a binary buffer stored on a .buffer

D8341: tests: force \n newlines when writing to sys.stdout

2020-03-29 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Without this, Python 3 on Windows inserts some \r that aren't present in the input, causing test-http-bad-server.t to fail. After this change, the test passes

D8339: dispatch: force \n for newlines on sys.std* streams (BC)

2020-03-29 Thread indygreg (Gregory Szorc)
indygreg added a comment. As scary as this patch sounds, I'm pretty sure it is safe, as I believe it restores compatibility with Python 2. Changing `sys.std*` to be binary streams instead of text streams would be a bigger BC break. And that is not a change I want to make, as this would

D8338: hook: move stdio redirection to context manager

2020-03-29 Thread indygreg (Gregory Szorc)
indygreg added a comment. This commit isn't strictly required. I performed this refactoring anticipating needing to add `sys.std*` fixups as part of this function. But it turns out that the SSH protocol server handles I/O redirection via a different mechanism. There actually appear to be

D8339: dispatch: force \n for newlines on sys.std* streams (BC)

2020-03-29 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The sys.std* streams behave differently on Python 3. On Python 3, these streams are an io.TextIOWrapper that wraps a binary buffer stored on a .buffer

D8338: hook: move stdio redirection to context manager

2020-03-29 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The old code was checking stdio redirection in a loop. This didn't make sense. The pattern is better expressed as a context manager IMO, so this commit

D8337: pycompat: change argv conversion semantics

2020-03-28 Thread indygreg (Gregory Szorc)
indygreg added a comment. indygreg added a subscriber: yuja. @yuja I'd appreciate your eyes on this since you have a firm grasp on Windows/Unicode matters... REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8337/new/ REVISION DETAIL

D8336: tests: use `f --hexdump` to print file content

2020-03-28 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The inline print.py in this test wasn't fully compatible with Python 3 because it was reading from sys.stdin, which already normalized line endings since it

D8337: pycompat: change argv conversion semantics

2020-03-28 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Use of os.fsencode() to convert Python's sys.argv back to bytes was not correct because it isn't the logically inverse operation from what CPython was doing

D8334: tests: pass str to matchoutput()

2020-03-28 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY It accepts a str, not bytes. This fixes a failure in test-hghave.t on Windows. Why it wasn't failing on Linux, I don't know. I suspect the Windows process

D8335: url: pass str to pathname2url

2020-03-28 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This is needed to appease Python 3. This fixes test-extdata.t and test-url-download.t on Python 3 on Windows. REPOSITORY rHG Mercurial BRANCH default

D6825: hgext: start building a library for simple hooks

2020-02-27 Thread indygreg (Gregory Szorc)
indygreg added inline comments. INLINE COMMENTS > __init__.py:6 > +# hack to workaround demandimport hiding the configitems > +configtable = changeset_published.configtable Assuming this is related to the IRC page. When the demand importer is active, an `import` will materialize a proxy module

D7967: exchange: recognize changegroup3 bundles in `getbundlespec()`

2020-02-26 Thread indygreg (Gregory Szorc)
indygreg added inline comments. INLINE COMMENTS > mharbison72 wrote in exchange.py:321 > I’m not sure now. I think I went this way because I’m pretty sure it > complained when I tried to generate a bzip2-v3 bundle. And since 01 is > mapped to v2 and the error message is talking about finding

D7967: exchange: recognize changegroup3 bundles in `getbundlespec()`

2020-02-26 Thread indygreg (Gregory Szorc)
indygreg added a comment. To clarify, bundle specifications are user-facing whereas changegroup versions are an internal implementation detail. Their version numbers are thus on different timelines and aren't strictly related. A bundle specification version is essentially a collection

D8122: pyoxidizer: allow extensions to be loaded from the file system

2020-02-15 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. This simply tells PyOxidizer to load the `sys.meta_path` importer that performs filesystem-based importing, like a normal Python process.

D6846: packaging: script the building of a MacOS installer using a custom python

2020-02-11 Thread indygreg (Gregory Szorc)
indygreg added inline comments. INLINE COMMENTS > downloads.py:29 > +'openssl': { > +'url': 'https://www.openssl.org/source/openssl-1.0.2t.tar.gz', > +'size': 5355422, 1.0.2u is out and should be used. > python.py:54 > + "darwin64-x86_64-cc", > +

D6846: packaging: script the building of a MacOS installer using a custom python

2020-02-11 Thread indygreg (Gregory Szorc)
indygreg added a comment. macOS supports a `@loader_path` and related magic tokens in rpath to load libraries relative to the current binary. See e.g. https://blogs.oracle.com/dipol/dynamic-libraries,-rpath,-and-mac-os and

D8063: packaging: lowercase the `contrib` and `templates` directories with Inno

2020-02-02 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. OK. If an upgraded install works, I'm happy with landing this. We might as well land all the larger installer refactorings in this release. That should set us up for hopefully a less

D8063: packaging: lowercase the `contrib` and `templates` directories with Inno

2020-02-01 Thread indygreg (Gregory Szorc)
indygreg added a comment. Did you test an upgrade over an existing install with this? My recollection is the case collision caused issues in my local testing, which is why I preserved the case difference between the installers. I would love to converge on lowercase. So if this just

D8062: packaging: bundle dulwich, keyring, and pywin32-ctypes with WiX too

2020-02-01 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. As a follow-up, we can likely merge the `requirements.txt[.in]` files now. Regarding the `Mercurial.url` file, that's a shortcut file that gets installed so people can open the

D7173: packaging: stage files and dynamically generate WiX installer

2020-01-31 Thread indygreg (Gregory Szorc)
indygreg added a comment. In D7173#118947 , @mharbison72 wrote: >> This change also means that Inno and WiX are now using very similar code for managing the install layout. This means that on disk both packages are nearly identical. The

D7450: packaging: add support for PyOxidizer

2020-01-30 Thread indygreg (Gregory Szorc)
Closed by commit rHG0dd8b752f287: packaging: add support for PyOxidizer (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7450?vs=19628=19728 CHANGES SINCE

D7450: packaging: add support for PyOxidizer

2020-01-26 Thread indygreg (Gregory Szorc)
indygreg added a comment. I just released PyOxidizer 0.5.0 and have updated the instructions in this file accordingly. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7450/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7450 To: indygreg,

D7450: packaging: add support for PyOxidizer

2020-01-26 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 19628. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7450?vs=19620=19628 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7450/new/ REVISION DETAIL

D7450: packaging: add support for PyOxidizer

2020-01-26 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 19620. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7450?vs=19619=19620 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7450/new/ REVISION DETAIL

D7450: packaging: add support for PyOxidizer

2020-01-26 Thread indygreg (Gregory Szorc)
indygreg added a comment. I don't have strong opinions about bundling templates and other resources internally versus externally. I do think it would be cool to have a fully self-contained executable. But that would require a command to write out embedded resources to the filesystem so

D7450: packaging: add support for PyOxidizer

2020-01-25 Thread indygreg (Gregory Szorc)
indygreg added a comment. This produces a working `hg` executable with templates support on Linux and Windows (I haven't tested macOS). I'd feel comfortable landing if it will unblock others to hack on things. The test harness currently has a ~25% failure rate with a PyOxidizer `hg`

D7450: packaging: add support for PyOxidizer

2020-01-25 Thread indygreg (Gregory Szorc)
indygreg edited the summary of this revision. indygreg retitled this revision from "INCOMPLETE pyoxidizer" to "packaging: add support for PyOxidizer". indygreg updated this revision to Diff 19619. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D7449: rust: vendor pyembed crate

2020-01-25 Thread indygreg (Gregory Szorc)
indygreg added a comment. indygreg abandoned this revision. Modern versions of pyoxidizer don't need to vendor the `pyembed` crate. So abandoning this. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7449/new/ REVISION DETAIL

D8005: wix: use original version string for MSI filename

2020-01-25 Thread indygreg (Gregory Szorc)
Closed by commit rHG62111bc5ff87: wix: use original version string for MSI filename (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8005?vs=19597=19611

D8004: wix: always normalize version string

2020-01-25 Thread indygreg (Gregory Szorc)
Closed by commit rHG2251b6cde170: wix: always normalize version string (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8004?vs=19596=19610 CHANGES SINCE LAST

D8003: wix: more robust normalization of RC version components

2020-01-25 Thread indygreg (Gregory Szorc)
Closed by commit rHG8d653abed861: wix: more robust normalization of RC version components (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8003?vs=19595=19609

D5043: hgdemandimport: vendor CPython 3.7 tokenizer modules

2020-01-24 Thread indygreg (Gregory Szorc)
indygreg added a comment. indygreg abandoned this revision. I submitted this series as a PoC. We likely won't move ahead with it. Although if we want to pursue prolonged Python 2.7 support, this series would likely make it easier... We can always resurrect it if we want. REPOSITORY

D8003: wix: more robust normalization of RC version components

2020-01-24 Thread indygreg (Gregory Szorc)
indygreg added a comment. This series is for stable in case it gets missed in the Phabricator UI. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8003/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8003 To: indygreg, #hg-reviewers Cc:

D8005: wix: use original version string for MSI filename

2020-01-24 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Version string normalization is mostly to placate MSI requirements. I think it makes sense to use the original version string in filenames. Since we can

D8004: wix: always normalize version string

2020-01-24 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Before, it was possible to pass in a custom version string which would not be valid in MSI. So we always normalize the version string. While we're here,

D8003: wix: more robust normalization of RC version components

2020-01-24 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY MSI has strict version requirements where the format is `A.B.C[.D]` and all fields must be numeric

D7973: packaging: add configparser to inno requirements file

2020-01-24 Thread indygreg (Gregory Szorc)
indygreg added a comment. Yeah, it was flagged as stable in the branch metadata. But whoever queued it didn't see that. (Perhaps we should improve `hg phabread` to warn on branch name mismatch?) I'll manually queue this for stable. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION

D7937: python-zstandard: blacken at 80 characters

2020-01-23 Thread indygreg (Gregory Szorc)
Closed by commit rHG5e84a96d865b: python-zstandard: blacken at 80 characters (authored by indygreg). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial CHANGES

D7979: debugcommands: add Python implementation to debuginstall

2020-01-23 Thread indygreg (Gregory Szorc)
Closed by commit rHG0b475b0b0344: debugcommands: add Python implementation to debuginstall (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7979?vs=19531=19533

D7978: run-tests: remove --py3-warnings

2020-01-23 Thread indygreg (Gregory Szorc)
Closed by commit rHGbd0de73cf810: run-tests: remove --py3-warnings (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7978?vs=19530=19532 CHANGES SINCE LAST

D7973: packaging: add configparser to inno requirements file

2020-01-23 Thread indygreg (Gregory Szorc)
Closed by commit rHG00aaf11ec399: packaging: add configparser to inno requirements file (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7973?vs=19524=19536

D7979: debugcommands: add Python implementation to debuginstall

2020-01-22 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This seems like a useful detail to print. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D7979 AFFECTED FILES

D7978: run-tests: remove --py3-warnings

2020-01-22 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This Python 2 only mode was to help Python 2 alert when doing things not supported on Python 3. Now that we have test coverage with Python 3, I don't

D7937: python-zstandard: blacken at 80 characters

2020-01-22 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 19525. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7937?vs=19441=19525 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7937/new/ REVISION DETAIL

D7973: packaging: add configparser to inno requirements file

2020-01-22 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This dependency is missing and pip complains about it in strict hashing mode. How this was missed, I have no clue. REPOSITORY rHG Mercurial BRANCH stable

D7954: hgdemandimport: apply lazy module loading to sys.meta_path finders

2020-01-21 Thread indygreg (Gregory Szorc)
Closed by commit rHGf81c17ec303c: hgdemandimport: apply lazy module loading to sys.meta_path finders (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D7949: py3: suppress unraisable exceptions in test-worker.t

2020-01-21 Thread indygreg (Gregory Szorc)
Closed by commit rHGb5aaa09be18c: py3: suppress unraisable exceptions in test-worker.t (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7949?vs=19453=19474

D7948: debugcommands: move away from line buffered output on binary stream

2020-01-21 Thread indygreg (Gregory Szorc)
Closed by commit rHG2ae43bc51483: debugcommands: move away from line buffered output on binary stream (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D7947: py3: conditionalize test-lfs-serve-access.t for Python 3.8

2020-01-21 Thread indygreg (Gregory Szorc)
Closed by commit rHG047ededd65ab: py3: conditionalize test-lfs-serve-access.t for Python 3.8 (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D7946: py3: add extra traceback line present on Python 3.8

2020-01-21 Thread indygreg (Gregory Szorc)
Closed by commit rHG1bb24b1ef368: py3: add extra traceback line present on Python 3.8 (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7946?vs=19450=19469

D7943: tests: conditionalize test-hightlight.t on pygments version

2020-01-21 Thread indygreg (Gregory Szorc)
Closed by commit rHGae5580ecdb38: tests: conditionalize test-hightlight.t on pygments version (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D7945: py3: conditionalize test-flagprocessor.t on Python 3.8

2020-01-21 Thread indygreg (Gregory Szorc)
Closed by commit rHGfeb3b4d1985a: py3: conditionalize test-flagprocessor.t on Python 3.8 (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7945?vs=19449=19468

D7953: hgdemandimport: disable on Python 3.5

2020-01-21 Thread indygreg (Gregory Szorc)
Closed by commit rHG1292386dd05c: hgdemandimport: disable on Python 3.5 (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7953?vs=19460=19466 CHANGES SINCE

D7954: hgdemandimport: apply lazy module loading to sys.meta_path finders

2020-01-20 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Python's `sys.meta_path` finders are the primary objects whose job it is to find a module at import time. When `import` is called, Python iterates objects in

D7953: hgdemandimport: disable on Python 3.5

2020-01-20 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The demand importer functionality isn't working at all on Python 3.5. I'm not sure what's wrong. Since it isn't working, let's disable it completely.

D7939: py3: glob over exception in test-check-py3-compat.t

2020-01-20 Thread indygreg (Gregory Szorc)
Closed by commit rHG97cc270c3ecc: py3: glob over exception in test-check-py3-compat.t (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7939?vs=19443=19457

D7938: py3: string normalization and I/O tweaks in test-lfs.t

2020-01-20 Thread indygreg (Gregory Szorc)
Closed by commit rHG2928d5af6281: py3: string normalization and I/O tweaks in test-lfs.t (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7938?vs=19442=19456

D7948: debugcommands: move away from line buffered output on binary stream

2020-01-18 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Line buffering on binary file objects is apparently undefined behavior in Python and emits a RuntimeWarning on Python 3.8. See

D7949: py3: suppress unraisable exceptions in test-worker.t

2020-01-18 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Python 3.8 calls sys.unraisablehook when an unraisable exception is encountered. The default behavior is to print a warning. test-worker.t was triggering

D7944: localrepo: handle ValueError during repository opening

2020-01-18 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Python 3.8 can raise ValueError on attempt of an I/O operation against an illegal path. This was causing test-remotefilelog-gc.t to fail on Python 3.8.

D7947: py3: conditionalize test-lfs-serve-access.t for Python 3.8

2020-01-18 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This is another case where Python 3.8's traceback printing varies subtly from older Python versions. Again, I'm not sure why. But this is apparently

D7946: py3: add extra traceback line present on Python 3.8

2020-01-18 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY I'm not sure why Python 3.8 is outputting this line. It appears to be a change in behavior of formatting tracebacks on Python 3.8. So let's add it to

D7945: py3: conditionalize test-flagprocessor.t on Python 3.8

2020-01-18 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY For reasons I don't understand, Python 3.8 is outputting a different lint in the traceback than prior Pythons. The lines in question are:

D7943: tests: conditionalize test-hightlight.t on pygments version

2020-01-18 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Output changed slightly in pygments 2.5. I thought it was easier to copy the line and add a version check than to add a regular expression because the line

D7940: py3: make flush() line optional

2020-01-18 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This line only appears on Python 3.5, not on 2.7 or 3.6+. Why, I have no clue. I suspect a weird regression in the bowels of Python's I/O system. Our test

D7942: py3: make test-http-bad-server.t conditional on Python 3.6+

2020-01-18 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY I'm not sure what's going on here, but we need to limit these lines to a Python 3.6 version range check because Python 3.5's behavior is subtly

D7941: py3: wallpaper over demand importer differences on Python 3.5

2020-01-17 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY For some reason, Python 3.5 and only Python 3.5's demand importer is importing extra parent modules. This is causing test output on 3.5 to diverge. While

D7939: py3: glob over exception in test-check-py3-compat.t

2020-01-17 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Python 3.6+ raise ModuleNotFoundError and older versions raise ImportError. Glob over the exception differences. For whatever reason, we were already doing

D7938: py3: string normalization and I/O tweaks in test-lfs.t

2020-01-17 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The print was inserting b'' on Python 3. In addition, since we weren't writing to the ui instance (which isn't readily available in this function), output

D7937: python-zstandard: blacken at 80 characters

2020-01-17 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY I made this change upstream and it will make it into the next release of python-zstandard. I figured I'd send it Mercurial's way because it will allow us to

D7879: sha1dc: use buffer protocol when parsing arguments

2020-01-15 Thread indygreg (Gregory Szorc)
Closed by commit rHGdc9b53482689: sha1dc: use buffer protocol when parsing arguments (authored by indygreg). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial

D7878: sha1dc: use proper string functions on Python 2/3

2020-01-15 Thread indygreg (Gregory Szorc)
Closed by commit rHG29a110e2776e: sha1dc: use proper string functions on Python 2/3 (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7878?vs=19277=19289

D7876: sha1dc: manually define integer types on msvc 2008

2020-01-15 Thread indygreg (Gregory Szorc)
Closed by commit rHGef36156eac9f: sha1dc: manually define integer types on msvc 2008 (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7876?vs=19275=19287

D7877: sha1dc: declare all variables at begininng of block

2020-01-15 Thread indygreg (Gregory Szorc)
Closed by commit rHGc3f741bb2f33: sha1dc: declare all variables at begininng of block (authored by indygreg). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7877?vs=19276=19288

D7879: sha1dc: use buffer protocol when parsing arguments

2020-01-14 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Without this, functions won't accept bytearray, memoryview, or other types that can be exposed as bytes to the C API. The most resilient way to obtain a

D7878: sha1dc: use proper string functions on Python 2/3

2020-01-14 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY PyString_FromStringAndSize doesn't exist on Python 3: we need to use PyUnicode_FromStringAndSize. The extension now compiles without warnings on Python 2

<    1   2   3   4   5   6   7   8   9   10   >