Matt Harbison <matt_harbison@yahoo.com> [Sun, 15 Dec 2019 21:26:21 -0500] rev 43886
util: rename a variable to avoid confusing pytype
Fixes the following warning:
line 1205, in f: No attribute 'append' on Dict[nothing, nothing] [attribute-error]
In Union[Dict[nothing, nothing], list]
Differential Revision: https://phab.mercurial-scm.org/D7673
Matt Harbison <matt_harbison@yahoo.com> [Sun, 15 Dec 2019 21:22:27 -0500] rev 43885
pytype: suppress the import-error in util.py when importing re2
Differential Revision: https://phab.mercurial-scm.org/D7672
Matt Harbison <matt_harbison@yahoo.com> [Sun, 15 Dec 2019 18:30:16 -0500] rev 43884
debugcommands: finish moving `extendeddateformats` from util to dateutil
Caught by pytype.
Differential Revision: https://phab.mercurial-scm.org/D7671
Matt Harbison <matt_harbison@yahoo.com> [Sat, 14 Dec 2019 18:31:50 -0500] rev 43883
ui: convert exception data to bytes when printing chained exception info
Caught by pytype.
Differential Revision: https://phab.mercurial-scm.org/D7670
Matt Harbison <matt_harbison@yahoo.com> [Sat, 14 Dec 2019 18:23:37 -0500] rev 43882
ui: use a context manager to handle file streams in edit()
Differential Revision: https://phab.mercurial-scm.org/D7669
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Dec 2019 15:30:16 -0800] rev 43881
graft: reuse cmdutl.resolvecommitoptions()
Differential Revision: https://phab.mercurial-scm.org/D7632
Kyle Lippincott <spectral@google.com> [Fri, 13 Dec 2019 15:46:25 -0800] rev 43880
rebase: make rebase not crash if p1 == p2 != nullid
While this shouldn't happen normally, some historical bugs can have caused this
kind of commit to exist. Instead of crashing and having it be unobvious how to
recover, let's try to continue on. Without this, we get an error like
"ValueError: min() arg is an empty sequence"
Differential Revision: https://phab.mercurial-scm.org/D7664
Kyle Lippincott <spectral@google.com> [Wed, 11 Dec 2019 19:42:05 -0800] rev 43879
merge: add commands.merge.require-rev to require an argument to hg merge
This is related to commands.rebase.requiredest, commands.update.requiredest, and
commands.push.require-revs. Since it isn't really a "destination", I went with
require-rev to be similar to push's require-revs.
Differential Revision: https://phab.mercurial-scm.org/D7620
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Dec 2019 09:59:03 -0800] rev 43878
tests: make test-config-env.py a little less hacky
Overriding os.path.isdir to always returns False is very
confusing. Let's make it more explicit by specifically not returning
any defaultrc/ configs.
Differential Revision: https://phab.mercurial-scm.org/D7623
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Dec 2019 12:57:13 -0800] rev 43877
help: get helptext/ data from `resources` module if available
For PyOxidizer, we need to read configs using the `resources`
module. This patch makes it so we use that module if available
(i.e. Python >= 3.7). It does that by adding a new `open_resource()`
function to our `resourceutil` module.
Tested by running `$PYTHON ./hg help pager` for each $PYTHON in
{python2, python3.6, python3.7}.
Differential Revision: https://phab.mercurial-scm.org/D7622