Sebastien Boisvert <sebhtml@protonmail.com> [Tue, 17 Nov 2020 21:30:50 -0500] rev 45900
log: add bookmark option to "hg log"
Before pushing a bookmark with "hg push origin -B 'my-topic'", it is useful to inspect
the list of commits that are ancestors of the bookmark.
By relying on scmutil.bookmarkrevs(), "hg log -B topic" has the same bookmark semantics
found in other commands like hg export, hg email, hg strip.
Differential Revision: https://phab.mercurial-scm.org/D9341
Matt Harbison <matt_harbison@yahoo.com> [Sat, 21 Nov 2020 16:55:07 -0500] rev 45899
extensions: gracefully warn when doing min version check with no local version
After doing a `make clean`, I started getting cryptic failures to import
extensions with the `minimumhgversion` attribute on py3:
*** failed to import extension evolve: '>' not supported between instances of 'int' and 'NoneType'
*** failed to import extension topic: '>' not supported between instances of 'int' and 'NoneType'
This now handles the `(None, None)` tuple before comparing, and disables the
extension with the same friendly message as in py2.
Differential Revision: https://phab.mercurial-scm.org/D9363
Matt Harbison <matt_harbison@yahoo.com> [Sat, 21 Nov 2020 15:34:54 -0500] rev 45898
make: switch the PYTHON default to `py.exe -3` on Windows
Python3 _is_ named `python.exe` on Windows, but that isn't necessarily on PATH
when installing from python.org. I do happen to have a python.exe on PATH in
`$LOCALAPPDATA/Microsoft/WindowsApps`, but it appears to be 0 bytes (likely
because of permission issues), and doesn't run:
$ python -V
- Cannot open
Pulkit hit the same error as I did though, so it isn't just my system:
$ make -C . local
make: Entering directory `/home/Dell/repos/hg-committed`
python setup.py \
build_py -c -d . \
build_ext -i \
build_hgexe -i \
build_mo
- Cannot openmake: *** [local] Error 1
The `py.exe` dispatcher lives in the Windows directory (so it is on PATH), looks
up the python.org installation, and invokes that interpreter directly. I get a
warning with py39, but if it's our issue, it was an existing one:
$ make -C .. local
make: Entering directory `/c/Users/Matt/hg'
py -3 setup.py \
build_py -c -d . \
build_ext -i \
build_hgexe -i \
build_mo
C:\Users\Matt\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\distutils_patch.py:25:
UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may
exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least
import Setuptools first.
warnings.warn(
The end result is a py3 based hg.exe that annoyingly won't run because it can't
find python39.dll. It will run tests (the ones without the `python3` shbang
line anyway), because the test runner adjusts PATH to include the python running
it.
Differential Revision: https://phab.mercurial-scm.org/D9361
Georges Racinet <georges.racinet@octobus.net> [Fri, 20 Nov 2020 21:06:38 +0100] rev 45897
heptapod-ci: hosting base image on registry.heptapod.net
We are now touching the rate limits of Docker Hub.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 20 Nov 2020 07:37:09 +0100] rev 45896
context: small update to ctx.status doc
The order of the "arguments" were not too clear, so we update the documentation
to clarify that.
Martin von Zweigbergk <martinvonz@google.com> [Mon, 16 Nov 2020 16:00:50 -0800] rev 45895
errors: use exit code 10 for parse errors
Now that `ParseError`s raised while reading the config file has been
converted into `ConfigError`s, the remaining parse errors should all
be "input errors" (i.e. exit code 10), according to
https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan.
Differential Revision: https://phab.mercurial-scm.org/D9332
Martin von Zweigbergk <martinvonz@google.com> [Fri, 20 Nov 2020 14:43:21 -0800] rev 45894
errors: raise ConfigError on failure to parse config file
This replaces two raises of `ParseError` by `ConfigError`, which makes
it so we get the desired exit code when `ui.detailed-exit-code` is
enabled. Because the exceptions include a location, I had to add that
to `ConfigError` as well. I considered making `ConfigError` a subclass
of `ParseError`, but it doesn't feel like it quite passes the "is-a"
test.
I used "config error: " as prefix for these errors instead of the
previous "hg: parse error: ", which seems a little less accurate now
(and, as I've said before, I don't know what the "hg: " part is
supposed to signify anyway). I can easily be convinced to change the
prefix to something else (including "abort: ").
Some of the exceptions raised here mean that we fail to even load the
`ui` object in the `dispatch` module. When that happens, we don't know
to use detailed exit codes, so some tests (e.g. `test-hgrc.t`) still
see exit code 255. I'll try to get back to that later. It should be
possible to give detailed exit codes if at least part of the config
can be read (e.g. when the system-wide one enables detailed exit codes
and the user's config fails to parse).
Differential Revision: https://phab.mercurial-scm.org/D9355
Martin von Zweigbergk <martinvonz@google.com> [Mon, 16 Nov 2020 10:56:54 -0800] rev 45893
histedit: don't crash if commit message is empty
If the commit message is empty, histedit will crash before this patch
because it assumes that `summary.splitlines()` is non-empty. One of
our users at work ran into this crash for a commit that was created by
an internal system.
I don't think we have a good way of testing this because it's hard to
create a commit with an empty commit message. I've added a comment to
help prevent regressions.
Differential Revision: https://phab.mercurial-scm.org/D9325