D7258: makefile: use python3 by default (BC)

2019-11-07 Thread indygreg (Gregory Szorc)
indygreg added a comment. In D7258#106380 , @martinvonz wrote: > All tests except for `test-check-py3-compat.t` pass on py3 (on Linux), right? Yes, tests are clean on Python 3.6 and 3.7. See https://ci.hg.gregoryszorc.com/. REPOSITORY

D7271: linelog: be more careful about types before looking for _target attribute

2019-11-07 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. I can live with assertions to appease our static analysis bot overlords as well, too. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7271/new/

D7272: pytype: don't warn us about ignored-on-py3 metaclasses

2019-11-07 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. I wonder if we should adopt a convention like `# TODO nopy2 XXX` to denote things to fix when Python 2 support is ripped out. Otherwise I feel like we're going to forget to undo many of

D7275: encoding: add comment-based type hints for pytype

2019-11-07 Thread indygreg (Gregory Szorc)
indygreg added inline comments. INLINE COMMENTS > encoding.py:24 > +if not globals(): # hide this from non-pytype users > +from typing import ( > +Any, Am I missing something here? Won't `globals()` always return a dict with elements? And isn't `typing` only available on Python 3?

D7286: match: suppress error about subscripting an exception

2019-11-07 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. Regarding filing a bug, ISTR exception subscription is deprecated (or at least discouraged) in modern Python versions: I believe you are encouraged to access e.g. `e.message` now. But I

D7256: repoview: define filteredchangelog as a top-level (non-local) class

2019-11-07 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. `type()` for the win! Thank you for this refactor! REPOSITORY rHG Mercurial BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7256/new/ REVISION DETAIL

D7296: pycompat: kludge around pytype being confused by __new__

2019-11-07 Thread indygreg (Gregory Szorc)
indygreg added a comment. This one makes me sad because of potential performance regressions due to call overhead. I'd almost rather rip out Python 2 support rather than land this. But I could be convinced if pytypes is as cool as you say... Is there no way to annotate the types here wit

D7258: makefile: use python3 by default (BC)

2019-11-08 Thread indygreg (Gregory Szorc)
indygreg added a comment. indygreg planned changes to this revision. I've seen `ifeq($(OS),Windows_NT)` used a lot. Although `OS` may be something else under msys. I'm away from my Windows machine until Sunday. I'll send a revision once I've had time to test on Windows. REPOSITORY rHG Merc

D7289: branchmap: always copy closednodes to a set

2019-11-08 Thread indygreg (Gregory Szorc)
This revision now requires changes to proceed. indygreg added a comment. indygreg requested changes to this revision. Could you please add a comment or add an annotation? I really don't like having to recreate collection instances to satisfy a type checker. Am I wrong in thinking this shouldn

D7290: branchmap: pytype is confused about bytestr

2019-11-08 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. Could you please look into this in more detail? Presumably the type checker isn't seeing that `pycompat.bytestr` will accept anything that can be cast to `str`, which `Exception` can. S

D7296: pycompat: kludge around pytype being confused by __new__

2019-11-08 Thread indygreg (Gregory Szorc)
This revision now requires changes to proceed. indygreg added a comment. indygreg requested changes to this revision. I'm going to mark for revisions until we know more so this doesn't show up in the reviewable list. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercuri

D7297: cleanup: remove now-obsolete wrong-arg-type annotations

2019-11-08 Thread indygreg (Gregory Szorc)
This revision now requires changes to proceed. indygreg added a comment. indygreg requested changes to this revision. Marking for revisions until we know what's going on with D7296 . REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mer

D7295: pytype: add a (very slow) test that executes pytype

2019-11-08 Thread indygreg (Gregory Szorc)
This revision now requires changes to proceed. indygreg added a comment. indygreg requested changes to this revision. This can't land per commit message, so setting status accordingly. I'm extremely supportive of adding type checking, whether it be pytype or mypy. I don't think it matters

D7305: cleanup: remove pointless r-prefixes on double-quoted strings

2019-11-08 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. Thank you so much for doing this! The presence of raw literals since removing the source transformer has been bothering me too. In the ideal world, we ban the use of raw literals except

D7306: cleanup: remove pointless r-prefixes on single-quoted strings

2019-11-08 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. Good riddance. REPOSITORY rHG Mercurial BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7306/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7306

D7309: vagrant: update vagrant image to buster from jessie

2019-11-08 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. Yeah, this code is a bit old. For building Linux packages, I'd prefer we do everything in [Docker] containers or spin up EC2 instances via automation.py. I'm sure I'll cross this bridge

D7311: utils: move the `dirs` definition in a dedicated module (API)

2019-11-08 Thread indygreg (Gregory Szorc)
This revision now requires changes to proceed. indygreg added a comment. indygreg requested changes to this revision. I agree with Martin that we should put this in `pathutils`. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7311/new/ REVISION DETAIL

D7312: revlog: introduce an explicit NodeMap class for pure code

2019-11-08 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. I hope the end state of this series establishes a formal interface for the index API. There is so much low-hanging fruit to be realized there. And we desperately need a format interface

D7313: revlog: move the nodemap into the index object (for pure)

2019-11-08 Thread indygreg (Gregory Szorc)
indygreg added a comment. This seems OK to me aside from the use of `range()`, which we don't want since `len()` can be massive and this could create perf problems on Python 2. INLINE COMMENTS > parsers.py:53 > +nodemap = revlogutils.NodeMap({nullid: nullrev}) > +for r in ran

D7317: revlog: access the nodemap through the index

2019-11-08 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. Note that this adds an extra lookup to calls to `rev()`, which is often used in tight loops. But I think things may be fine. And we can always reintroduce the property if it shows up in

D7320: revlog: clean up the node of all revision stripped in the C code

2019-11-08 Thread indygreg (Gregory Szorc)
This revision now requires changes to proceed. indygreg added a comment. indygreg requested changes to this revision. The first element in the index is a sentinel entry for `nullid`. I suspect the `+1` here is meant to ignore that sentinel. The comment for this function clearly calls out this

D7321: revlog: deal with nodemap deletion within the index

2019-11-08 Thread indygreg (Gregory Szorc)
indygreg added a comment. I approve of the direction. In addition to inline comments, same deal as last patch: is there a sentinel entry to worry about? INLINE COMMENTS > parsers.py:60 > +if 'nodemap' in vars(self): > +for r in range(start, len(self)): > +

D7322: index: add a `has_node` method (API)

2019-11-08 Thread indygreg (Gregory Szorc)
This revision now requires changes to proceed. indygreg added inline comments. indygreg requested changes to this revision. INLINE COMMENTS > revlog.c:2071 > + int ret = index_contains(self, args); > + return PyBool_FromLong((long)ret); > +} `index_contains()` can return `-1` in many cas

D7323: index: use `index.has_node` in `revlog.addrevision`

2019-11-08 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. I wholeheartedly approve of introducing an explicit API for lookups here. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7323/new/ REVISION DETA

D7324: index: add a `rev` method (API)

2019-11-08 Thread indygreg (Gregory Szorc)
This revision now requires changes to proceed. indygreg added a comment. indygreg requested changes to this revision. The code is fine. But since I've already left a number of comments on this series, I thought I'd ask about raising a better exception than `RevlogError`. I thought we had dedi

D7325: index: use `index.rev` in `revlog.rev`

2019-11-08 Thread indygreg (Gregory Szorc)
This revision now requires changes to proceed. indygreg added a comment. indygreg requested changes to this revision. This needs a re-review depending on what happens in D7324 . REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercuria

D7337: index: use `index.get_rev` in `repoview.pinnedrevs`

2019-11-08 Thread indygreg (Gregory Szorc)
indygreg added inline comments. INLINE COMMENTS > repoview.py:64 > +pinned.update(rev(t[0]) for t in tags.values()) > +pinned.discard(None) > return pinned Why was `pinned.discard(None)` added? REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-s

D7342: index: use `index.has_node` in `tags.findglobaltags`

2019-11-08 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added inline comments. indygreg accepted this revision. INLINE COMMENTS > tags.py:198 > +assert repo.changelog.index.has_node( > +head > ), b"tag cache returned bogus head %s" % short(head) `repo.changelog` in

D7337: index: use `index.get_rev` in `repoview.pinnedrevs`

2019-11-08 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added inline comments. indygreg accepted this revision. INLINE COMMENTS > indygreg wrote in repoview.py:64 > Why was `pinned.discard(None)` added? Nevermind. This `get_rev()` can return `None`. REPOSITORY rHG Mercurial CHANGES SINCE L

D7154: tests: run black on run-tests.py

2019-11-08 Thread indygreg (Gregory Szorc)
indygreg added a comment. indygreg abandoned this revision. This refactor landed elsewhere. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7154/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7154 To: indygreg, #hg-reviewers Cc: mercurial-devel

D7173: packaging: stage files and dynamically generate WiX installer

2019-11-08 Thread indygreg (Gregory Szorc)
indygreg added a comment. indygreg abandoned this revision. This has conflicts on rebase. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7173/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7173 To: indygreg, #hg-reviewers Cc: mercurial-devel _

D7173: packaging: stage files and dynamically generate WiX installer

2019-11-08 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 17805. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7173?vs=17406&id=17805 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7173/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7

D7155: packaging: clean up excess packages for Inno

2019-11-08 Thread indygreg (Gregory Szorc)
Closed by commit rHG738909683719: packaging: clean up excess packages for Inno (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 S

D7158: packaging: process Inno Setup files with Jinja2

2019-11-08 Thread indygreg (Gregory Szorc)
Closed by commit rHG04b862675439: packaging: process Inno Setup files with Jinja2 (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 CHANGE

D7157: packaging: install and run Inno files in a build directory

2019-11-08 Thread indygreg (Gregory Szorc)
Closed by commit rHG876a3dd74c8c: packaging: install and run Inno files in a build directory (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 Mercur

D7159: packaging: stage installed files for Inno

2019-11-08 Thread indygreg (Gregory Szorc)
Closed by commit rHGd2ea31a2546d: packaging: stage installed files for Inno (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 SINC

D7160: packaging: remove hg.exe.local file

2019-11-08 Thread indygreg (Gregory Szorc)
Closed by commit rHGe8ab29e57d40: packaging: remove hg.exe.local file (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

D7162: packaging: install documentation to doc/ directory

2019-11-08 Thread indygreg (Gregory Szorc)
Closed by commit rHG6e1ca6d43ada: packaging: install documentation to doc/ directory (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 CHA

D7161: packaging: always pass VERSION into Inno invocation

2019-11-08 Thread indygreg (Gregory Szorc)
Closed by commit rHGcf5eaf24577f: packaging: always pass VERSION into Inno invocation (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 CH

D7163: packaging: add logo-droplets.svg

2019-11-08 Thread indygreg (Gregory Szorc)
Closed by commit rHG29083459825b: packaging: add logo-droplets.svg (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 UP

D7156: packaging: consolidate CLI functionality into packaging.py

2019-11-08 Thread indygreg (Gregory Szorc)
Closed by commit rHGf2ef4f9367cb: packaging: consolidate CLI functionality into packaging.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". CHANGED PRIOR TO COMMIT

D7164: packaging: install hgk as hgk.tcl

2019-11-08 Thread indygreg (Gregory Szorc)
Closed by commit rHG9f5eba23495f: packaging: install hgk as hgk.tcl (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 U

D7166: packaging: ship all help .txt files on WiX

2019-11-08 Thread indygreg (Gregory Szorc)
Closed by commit rHGe7896eaca05f: packaging: ship all help .txt files on WiX (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 SIN

D7167: packaging: install contrib/mq.el on WiX

2019-11-08 Thread indygreg (Gregory Szorc)
Closed by commit rHGb65fd2b43e0a: packaging: install contrib/mq.el on WiX (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

D7165: packaging: stop installing i18n files

2019-11-08 Thread indygreg (Gregory Szorc)
Closed by commit rHGb7db6302af1f: packaging: stop installing i18n files (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 LA

D7324: index: add a `rev` method (API)

2019-11-09 Thread indygreg (Gregory Szorc)
This revision now requires changes to proceed. indygreg added a comment. indygreg requested changes to this revision. I'm fine ignoring the `RevlogError` quirk, since it already exists. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7324/new/ REVISION

D7125: tests: rename stopped and started variables to reflect times

2019-11-11 Thread indygreg (Gregory Szorc)
Closed by commit rHGae91e4e4c9b0: tests: rename stopped and started variables to reflect times (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/D7125?vs=17324&id

D7126: tests: use time.time() for relative start and stop times

2019-11-11 Thread indygreg (Gregory Szorc)
Closed by commit rHGac140b85aae9: tests: use time.time() for relative start and stop times (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/D7126?vs=17325&id=180

D7169: packaging: remove hg-ssh.8.html from Inno installer

2019-11-11 Thread indygreg (Gregory Szorc)
Closed by commit rHGa2f28a8746bf: packaging: remove hg-ssh.8.html from Inno installer (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 CH

D7168: packaging: install .rc files to hgrc.d

2019-11-11 Thread indygreg (Gregory Szorc)
Closed by commit rHG14ce03e13508: packaging: install .rc files to hgrc.d (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 L

D7170: packaging: stop installing Contributors.txt

2019-11-11 Thread indygreg (Gregory Szorc)
Closed by commit rHG2574330dd0f6: packaging: stop installing Contributors.txt (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 SI

D7171: packaging: write out editor.rc in Python

2019-11-11 Thread indygreg (Gregory Szorc)
Closed by commit rHG8aa6aa9b7843: packaging: write out editor.rc in Python (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

D7172: packaging: use lower case for RC files

2019-11-11 Thread indygreg (Gregory Szorc)
Closed by commit rHG11db74349b24: packaging: use lower case for RC files (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 L

D7167: packaging: install contrib/mq.el on WiX

2019-11-11 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 18032. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7167?vs=17819&id=18032 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7167/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7

D7166: packaging: ship all help .txt files on WiX

2019-11-11 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 18031. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7166?vs=17818&id=18031 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7166/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7

D7173: packaging: stage files and dynamically generate WiX installer

2019-11-11 Thread indygreg (Gregory Szorc)
indygreg edited the summary of this revision. indygreg updated this revision to Diff 18033. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7173?vs=17805&id=18033 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7173/new/ REVIS

D7167: packaging: install contrib/mq.el on WiX

2019-11-11 Thread indygreg (Gregory Szorc)
indygreg added a comment. indygreg added subscribers: martinvonz, durin42. This got dropped on committed but Phabricator is confused. Please re-land @martinvonz or @durin42. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7167/new/ REVISION DETAIL ht

D7166: packaging: ship all help .txt files on WiX

2019-11-11 Thread indygreg (Gregory Szorc)
indygreg added a comment. indygreg added a subscriber: durin42. This got dropped on committed but Phabricator is confused about its closedstate. Please re-review and land @martinvonz or @durin42. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7166/new/

D7368: fuzz: migrate bdiff fuzzer to use FuzzedDataProvider

2019-11-11 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. Not much context was given in the commit message. But if this makes our automated fuzzing overlords happier, then I suppose this is fine. REPOSITORY rHG Mercurial CHANGES SINCE LAST

D7371: tests: add optional output when wheel is missing

2019-11-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY If the `wheel` package isn't installed, pip will emit a warning on stderr complaining about that. Alternatively, we could redirect stderr to stdout and swallow

D7173: packaging: stage files and dynamically generate WiX installer

2019-11-12 Thread indygreg (Gregory Szorc)
indygreg added a comment. This has been rebased and all dependent commits have landed. Please take another look, @durin42. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7173/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7173 To: indygreg, #

D7371: tests: add optional output when wheel is missing

2019-11-13 Thread indygreg (Gregory Szorc)
Closed by commit rHG45c15ed06f33: tests: add optional output when wheel is missing (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/D7371?vs=18038&id=18058 CHAN

D7173: packaging: stage files and dynamically generate WiX installer

2019-11-13 Thread indygreg (Gregory Szorc)
Closed by commit rHG94eac340d212: packaging: stage files and dynamically generate WiX installer (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 Mer

D7411: dirs: resolve fuzzer OOM situation by disallowing deep directory hierarchies

2019-11-14 Thread indygreg (Gregory Szorc)
indygreg added a comment. I support this approach. But I'd feel better if we captured the performance implications. Especially since there is a comment just below talking about how important the loop is for performance. Perhaps we should add this check to the loop below by checking how m

D7376: help: create packages for the help text

2019-11-14 Thread indygreg (Gregory Szorc)
indygreg added a comment. FWIW I have a series of patches somewhere that teach the help, templates, etc subsystems to use the `importlib.resources` API if available. I also have plans to enable PyOxidizer to package resources with more flexibility so we wouldn't necessarily have to renam

D7390: extdiff: use field names instead of field numbers on scmutil.status

2019-11-14 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. THANK YOU. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7390/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7390 To: durin42, #hg-rev

D7395: uncommit: use field names instead of field numbers on scmutil.status

2019-11-14 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. I weep every time I see single letter variables. But it isn't your fault. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7395/new/ REVISION DETA

D7397: cmdutil: convert terse status result back to an scmutil.status

2019-11-14 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. I can't believe we were really returning a list here. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7397/new/ REVISION DETAIL https://phab.me

D7406: scmutil: convert status data object from a tuple to an attrs (API)

2019-11-14 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. Good riddance. Do the revlog index next! :) REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7406/new/ REVISION DETAIL https://phab.mercuri

D7416: procutil: support for obtaining an importlib.abc.ResourceReader

2019-11-14 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Python 3.7's importing mechanism offers a new "resource reader" API that allows module loaders to provide an object which can be used for obtaining information

D7417: procutil: extract executable-relative resources test

2019-11-14 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We'll want to test for this in the new resource reading API. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D7417

D7418: procutil: teach resourcereader() to handle exe relative resources

2019-11-14 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Mercurial distributions like those produced with py2exe store their data/resource files relative to the executable. For example, in our Windows distributions, h

D7419: help: port to ResourceReader API

2019-11-14 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Previous commits introduced a mechanism to obtain an importlib.abc.ResourceReader for Mercurial resource data. This commit ports I/O in the help system to us

D7415: procutil: move datapath logic to procutil()

2019-11-14 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY And refactor it as a function. procutil.py is the more appropriate location for this code, as procutil is responsible for managing aspects of the executable

D7415: procutil: move datapath logic to procutil()

2019-11-14 Thread indygreg (Gregory Szorc)
indygreg added a comment. indygreg added a subscriber: mharbison72. indygreg planned changes to this revision. This is an old series I had authored a few months back as part of preliminary PyOxidizer porting. It demonstrates an alternate approach to loading files with the resources API. Essen

D7418: procutil: teach resourcereader() to handle exe relative resources

2019-11-14 Thread indygreg (Gregory Szorc)
indygreg added a comment. indygreg planned changes to this revision. The commit message on this one is probably a bit out of date, since packaging has changed some since I initially authored this commit. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7

D7419: help: port to ResourceReader API

2019-11-14 Thread indygreg (Gregory Szorc)
indygreg added a comment. indygreg planned changes to this revision. I have other patches to attempt to do similar things for templating and rc.d files if there is interest in reviving this series. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7419/ne

D7411: dirs: resolve fuzzer OOM situation by disallowing deep directory hierarchies

2019-11-14 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. This is much better. Thanks. REPOSITORY rHG Mercurial BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7411/new/ REVISION DETAIL https://phab.mercurial

D7376: help: create packages for the help text

2019-11-14 Thread indygreg (Gregory Szorc)
indygreg added a comment. See the series starting at D7415 for the patches I authored a while ago. Please take them over and push them over the finish line if you agree with the approach! REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://p

D7422: rust: remove hgcli project

2019-11-14 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This code is a logical precursor to PyOxidizer, which we will soon introduce to provide similar functionality. REPOSITORY rHG Mercurial BRAN

D7421: packaging: convert to UNIX line endings

2019-11-14 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY I must have my editor on Windows configured incorrectly because I submitted patches with Windows line endings :( 1. skip-blame whitespace only line ending ch

D7420: black: blacken scripts

2019-11-14 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY test-check-format.t doesn't appear to detect Python scripts with shebangs. But my editor which is configured to auto run black on Python files does an

D7424: [RFC] pyoxidizer

2019-11-14 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This needs lots of work. Posting so @mharbison and others can see what I've been hacking on. To build: $ cd rust/hgcli $ pyoxidi

D7422: rust: remove hgcli project

2019-11-14 Thread indygreg (Gregory Szorc)
indygreg added a comment. indygreg planned changes to this revision. We'll want to hold off on this until PyOxidizer is ready. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7422/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7422 To: indygreg

D7423: rust: vendor pyembed crate

2019-11-14 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We want to use PyOxidizer to produce machine native executables for running Mercurial. This commit starts the process of doing that. Unde

D7423: rust: vendor pyembed crate

2019-11-14 Thread indygreg (Gregory Szorc)
indygreg added a comment. indygreg planned changes to this revision. We'll want to hold off on this until PyOxidizer is ready. And hopefully I can land the necessary changes to `rust-cpython` to avoid having to vendor this crate. I should try to get those patches landed upstream... REPOSITOR

D7424: [RFC] pyoxidizer

2019-11-14 Thread indygreg (Gregory Szorc)
indygreg added a comment. indygreg planned changes to this revision. This is in no way suitable for review or landing. Many things are missing. Binaries segfault on startup (which is likely a PyOxidizer bug, ugh). REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-

D7421: packaging: convert to UNIX line endings

2019-11-14 Thread indygreg (Gregory Szorc)
Closed by commit rHG303bf312d5ed: packaging: convert to UNIX line endings (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

D7420: black: blacken scripts

2019-11-14 Thread indygreg (Gregory Szorc)
Closed by commit rHG99e231afc29c: black: blacken scripts (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 UPDATE http

D7426: defaults: rename default.d to defaultrc to make it a valid package name

2019-11-16 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. Presumably we'll need a new `__init__.py` and corresponding package entry in `setup.py`. But that can come later. REPOSITORY rHG Mercurial BRANCH default CHANGES SINCE LAST ACTION

D7433: procutil: move mainfrozen() to new resourceutil.py

2019-11-16 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. I'm not super thrilled about yet another module in the startup path. But the reasoning makes sense. We can always refactor later if the post resources world turns out to remove the circ

D7435: i18n: get datapath directly from resourceutil

2019-11-16 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added inline comments. indygreg accepted this revision. INLINE COMMENTS > i18n.py:57 > +_ugettext = t.gettext > > I'm not thrilled about the use of global variables here: I feel like the locale directory and related functionality

D7436: util: remove datapath and swith users over to resourceutil

2019-11-16 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. Nice series! REPOSITORY rHG Mercurial BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7436/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7436

D7444: setup: conditionalize access to `sys.dllhandle` when building extensions

2019-11-16 Thread indygreg (Gregory Szorc)
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. This workaround is fine for PyOxidizer. But `pythonlib` and `hgpythonlib.h` and `exewrapper.c` aren't needed for PyOxidizer. So there is further room to make large parts of this code co

D7415: procutil: move datapath logic to procutil()

2019-11-16 Thread indygreg (Gregory Szorc)
indygreg added a comment. indygreg abandoned this revision. This patch is now irrelevant due to D7434 . REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7415/new/ REVISION DETAIL https://phab.mercurial-scm.org/D74

D7416: procutil: support for obtaining an importlib.abc.ResourceReader

2019-11-16 Thread indygreg (Gregory Szorc)
indygreg added a comment. indygreg added a subscriber: martinvonz. @martinvonz do you want to pick up this series or do you want me to rebase it on top of `packageutil`? If you leave it up to me, I'm not sure when I'll get around to it. (I'd prefer to focus my time on shoring up PyOxidizer.)

D7445: doc: don't use mutable default arguments

2019-11-16 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY It appears our mutable default arguments checker doesn't find arguments not on the first line of a function definition :( The arguments aren't used, so the d

D7448: tests: check for Windows line endings

2019-11-16 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We shouldn't generally be using Windows line endings in files under version control. I've accidentally committed a few files with Windows line endings recently.

D7447: tests: verify that Python scripts are blackened

2019-11-16 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Scripts are Python too. They should be blackened. (As suggested by Pierre-Yves in D7420 .) REPOSITORY rHG Mercurial B

D7446: black: blacken scripts

2019-11-16 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY These scripts weren't blackened. I found these as part of adding script checking to test-check-format.t. 1. skip-blame black REPOSITORY rHG Merc

  1   2   3   4   5   6   7   8   9   10   >