Added tag 5.3rc0 for changeset
84a0102c05c7
phabricator: use .arcconfig for `phabricator.url` if not set locally
This setting is also per repo; see the previous commit for details.
The existing `conduit_uri` setting is the previous name of `phabricator.uri`[1]
and while it could easily be queried before the latter for compatibility, the
config in this repo has '/api' appended. That's already done in `callconduit()`,
which would clearly end up giving the wrong result. It looks like the path of
the URL is now ignored in user configs[2], so add the modern setting without it
to this repo's .arcconfig.
Sadly, we still need to have contributors configure `auth.hg.phabtoken` (and
therefore `auth.hg.prefix` to link it to `phabricator.url`) in order to submit
patches, but at least now it's localized to a single section.
[1] https://secure.phabricator.com/book/phabricator/article/arcanist_new_project/
[2] https://github.com/phacility/arcanist/blob/
cc850163f30c4697e925df0d6212469679600a2c/scripts/arcanist.php#L271
Differential Revision: https://phab.mercurial-scm.org/D7935
phabricator: use .arcconfig for the callsign if not set locally (
issue6243)
This makes things easier for people working with more than one repository
because this file can be committed to each repository. The bug report asks to
read <repo>/.arcrc, but AFAICT, that file lives in ~/ and holds the credentials.
And we already track an .arcconfig file. Any callsign set globally is still
used if that is all that is present, but .arcconfig will override it if
available. The idea behind letting the local hgrc override .arcconfig is that
the developer may need to do testing against another server, and not dirty the
working directory.
Originally I was going to just try to read the callsign in `getrepophid()` if it
wasn't present in the hg config. That works fine, but I think it also makes
sense to read the URL from this file too. That would have worked less well
because `readurltoken()` doesn't have access to the repo object to know where to
find the file. Supplimenting the config mechanism is less magical because it
reports the source and value of the properties used, and it doesn't need to read
the file twice.
Invalid hgrc files generally cause the program to abort. I only flagged it as a
warning here because it's not our config file, not crucial to the whole program
operating, and really shouldn't be corrupt in the typical case where it is
checked into the repo.
Differential Revision: https://phab.mercurial-scm.org/D7934
config: add a function to insert non-file based, but overridable settings
This will be used in the next patch.
Until relatively recently (
473510bf0575), there was no official way for
extensions to inject per-repo config data, so it probably makes sense that
`ui.setconfig()` items are sticky, and not affected by loading more config
files. But that makes it cumbersome if the extension wants to allow the data it
might add to be overridden by any data in the local hgrc file. The only thing I
could get to work was to load the local hgrc first, and then check if the source
for the config item that should be overridden was *not* the local hgrc file
name. But that's brittle because in addition to the file name, the source
contains the line number, there are the usual '\' vs '/' platform differences,
etc.
Differential Revision: https://phab.mercurial-scm.org/D7933
tests: restore phabricator tests and regenerate the recordings
These contain the new API chatter. Most of the changes are because some new
commits were created, but they're pretty obviously equivalent. I have no idea
why the last recording contains real data, whereas it previously looked fake.
Differential Revision: https://phab.mercurial-scm.org/D7920
hgrc: introduce HGRCSKIPREPO to skip reading the repository's hgrc
We had a way to change the behavior regarding reading the global and user
config, but we had nothing regarding the repository hgrc itself.
This option is useful in situation where scripts need to be able to work around
strange configuration set by the user in his repository. (and were HGPLAIN is
not enough).
Differential Revision: https://phab.mercurial-scm.org/D7807
debugcommands: move away from line buffered output on binary stream
Line buffering on binary file objects is apparently undefined behavior
in Python and emits a RuntimeWarning on Python 3.8. See
https://bugs.python.org/
issue32236.
This commit changes the I/O logging file descriptor from line
buffered to unbuffered to work around this. I'm no fan of
unbuffered I/O for performance reasons. But I don't think it
is an issue here given the nature of the code.
With this change, test-ssh-proto.t now passes on Python 3.8.
Differential Revision: https://phab.mercurial-scm.org/D7948