Matt Harbison <matt_harbison@yahoo.com> [Mon, 23 Nov 2020 11:47:06 -0500] rev 45944
ui: ensure `getpass()` returns bytes
Previously, this could return either bytes or str. I'm not sure which direction
we should go in, but since the input is bytes, I guess bytes makes sense as
output. `debuguigetpass` crashed because it assumed bytes would be returned,
`sslcontext.load_cert_chain()` is happy with bytes or str if the type info in
PyCharm is correct, and `smtplib.SMTP.login()` wants str.
I couldn't figure out how to test this, because the test stalls for input with
`echo test | hg debuguigetpass --config ui.interactive=1`, likely because it
drains stdin before prompting. The custom input reading with `ui.nontty=1` does
not.
I'm also a bit concerned with all of this encoding/decoding. The existing code
in the mail module uses `encoding.strfromlocal()`, but the username and password
are ascii encoded/decoded in `mercurial.url.passwordmgr.find_user_password()`
with `pycompat.{str,bytes}url()`. I'm not sure if this inconsistency could
cause subtle compatability issues.
Differential Revision: https://phab.mercurial-scm.org/D9375
Matt Harbison <matt_harbison@yahoo.com> [Thu, 26 Nov 2020 02:28:42 -0500] rev 45943
packaging: regenerate the Windows requirements manifest on Windows
SecretStorage is a Linux package, and the other stuff removed is a dependency of
it. I assume this was last generated on Linux, and noticed this trying to add
another package and regenerating on Windows.
Differential Revision: https://phab.mercurial-scm.org/D9404
Matt Harbison <matt_harbison@yahoo.com> [Thu, 26 Nov 2020 03:09:56 -0500] rev 45942
pyoxidizer: point to the py3 requirements instead of py2 on Windows
Differential Revision: https://phab.mercurial-scm.org/D9406
Augie Fackler <raf@durin42.com> [Wed, 25 Nov 2020 22:38:23 -0500] rev 45941
git: update test for hg and git output changes
Clearly nobody is running this in their CI. :(
Differential Revision: https://phab.mercurial-scm.org/D9403
Augie Fackler <raf@durin42.com> [Wed, 25 Nov 2020 22:23:23 -0500] rev 45940
gitlog: add tiprev() function
Lots of stuff was broken because this was missing.
Differential Revision: https://phab.mercurial-scm.org/D9402
Simon Sapin <simon-commits@exyr.org> [Tue, 24 Nov 2020 17:49:16 +0100] rev 45939
requirements: move loading to hg-core and add parsing
No functional change, checking comes later.
Differential Revision: https://phab.mercurial-scm.org/D9398
Simon Sapin <simon-commits@exyr.org> [Tue, 24 Nov 2020 15:11:58 +0100] rev 45938
rhg: add a `debugrequirements` subcommand
For now it only prints the contents of `.hg/requires` as-is, without parsing.
Differential Revision: https://phab.mercurial-scm.org/D9397
Augie Fackler <augie@google.com> [Wed, 25 Nov 2020 11:08:28 -0500] rev 45937
pyoxidizer: make sure defaultrc directory exists before trying to write to it
When doing some work involving one-file binaries, this line is failing
for me. It seems reasonable to just make sure the destination
directory exists before splatting the file into it.
Differential Revision: https://phab.mercurial-scm.org/D9401
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 21 Nov 2020 13:30:50 +0530] rev 45936
commands: fix checking of share safe requirement on `config --shared`
The `if requirements.SHARESAFE_REQUIREMENT in ...` was wrongly placed inside
another if statement which made the check unreachable.
Differential Revision: https://phab.mercurial-scm.org/D9360
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 20 Nov 2020 14:34:15 +0530] rev 45935
dispatch: pass root path in ui.readconfig() as root of main repo
Since we are reading main (shared-source) repository config options, we
should pass root as that repository root only.
Differential Revision: https://phab.mercurial-scm.org/D9359
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 16 Oct 2020 19:03:09 +0530] rev 45934
scmutil: try-delete `.hg/store/requires` if store requirements are empty
When downgrading from a shared-safe repository to non-shared-safe repository, we
end up in a case where we had requirements stored in `.hg/store/requires` but no
longer want them there.
Let's explicitly try delete the `.hg/store/requires` file if store requirements
are empty.
Differential Revision: https://phab.mercurial-scm.org/D9357
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Nov 2020 10:39:51 -0800] rev 45933
errors: raise InputError on bad top-level flags
Differential Revision: https://phab.mercurial-scm.org/D9388
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Nov 2020 23:08:58 -0800] rev 45932
errors: raise StateError on uncommitted changes when merge starts
Differential Revision: https://phab.mercurial-scm.org/D9393
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Nov 2020 16:48:13 -0800] rev 45931
errors: raise StateError when there are unresolves merge conflicts
Differential Revision: https://phab.mercurial-scm.org/D9392
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Nov 2020 16:20:02 -0800] rev 45930
errors: introduce SecurityError and use it in a few places
This is part of
https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan. There are
perhaps more errors in `sslutil.py` that should raise `SecurityError`;
I picked the most clear ones to start with.
Differential Revision: https://phab.mercurial-scm.org/D9390
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Nov 2020 16:05:03 -0800] rev 45929
errors: raise InputError when too few arguments given to alias
Differential Revision: https://phab.mercurial-scm.org/D9389
Martin von Zweigbergk <martinvonz@google.com> [Tue, 17 Nov 2020 16:32:03 -0800] rev 45928
errors: raise InputError on bad bookmark argument
Differential Revision: https://phab.mercurial-scm.org/D9385
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Nov 2020 12:27:22 -0800] rev 45927
errors: raise ConfigError on bad alias definition
Differential Revision: https://phab.mercurial-scm.org/D9384
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Nov 2020 10:42:03 -0800] rev 45926
errors: raise InputError on bad repo arguments
I'm not sure if one of these should be StateError...
Differential Revision: https://phab.mercurial-scm.org/D9383
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Nov 2020 14:48:05 -0800] rev 45925
errors: drop trailing "!" for some errors about bookmarks
Differential Revision: https://phab.mercurial-scm.org/D9382
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Nov 2020 12:47:08 -0800] rev 45924
errors: remove trailing "!" in messages about bad top-level args
Differential Revision: https://phab.mercurial-scm.org/D9381
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Nov 2020 12:42:57 -0800] rev 45923
errors: remove trailing "!" in messages about creating new heads on push
Differential Revision: https://phab.mercurial-scm.org/D9380
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Nov 2020 12:31:53 -0800] rev 45922
errors: consistently don't use trailing "!" in "not found in manifest" message
We already had some places with the same message without the trailing
"!".
Differential Revision: https://phab.mercurial-scm.org/D9379
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Nov 2020 11:18:48 -0800] rev 45921
errors: remove trailing "!" from some error messages for consistency
Some types of exceptions had a trailing "!" printed after the message
from the exception itself. I guess some of these errors seem a little
more severe (?), but it seems more likely that the inconsistency was
just an oversight.
Differential Revision: https://phab.mercurial-scm.org/D9378
Simon Sapin <simon-commits@exyr.org> [Mon, 23 Nov 2020 12:20:19 +0100] rev 45920
bisect: use tuple literal instead of split on string literal
Differential Revision: https://phab.mercurial-scm.org/D9371
Simon Sapin <simon-commits@exyr.org> [Mon, 23 Nov 2020 11:58:52 +0100] rev 45919
hgignore: add VS Code config
Differential Revision: https://phab.mercurial-scm.org/D9370
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Nov 2020 11:56:10 -0800] rev 45918
tests: make test-worker.t pass on py2
I broke the py2 version in https://phab.mercurial-scm.org/D9287
because the `WorkerError.__bytes__()` (or `.__str__()`?) output was
different in py2 compared to py3. Part of the problem was that I
didn't propagate the status code that was passed in to the superclass
so it could get printed. This patch fixes that. I don't know how it
worked on py3 before this patch...
I also added the usual `__bytes__ = _tobytes` override for good
measure. It doesn't seem to be needed for tests to pass, though.
Differential Revision: https://phab.mercurial-scm.org/D9377
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Nov 2020 11:30:43 -0800] rev 45917
tests: update test-https.t's #no-defaultcacertsloaded block with new exit code
I'm pretty sure I broke this in
https://phab.mercurial-scm.org/D9309. It was reported by the Heptapod
CI.
Differential Revision: https://phab.mercurial-scm.org/D9376
Pulkit Goyal <pulkit@yandex-team.ru> [Sun, 22 Nov 2020 23:53:09 +0530] rev 45916
chg: fix test-check-clang-format.t failure
Differential Revision: https://phab.mercurial-scm.org/D9365
Sebastien Boisvert <sebhtml@protonmail.com> [Tue, 17 Nov 2020 21:30:50 -0500] rev 45915
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