Martin von Zweigbergk <martinvonz@google.com> [Sun, 02 Aug 2020 10:08:18 -0700] rev 45269
packaging: make "mercurial.defaultrc" a key in package_data
Before this patch, we had a `mercurial` key with a `defaultrc/*.rc`
value. It seems more correct to have a `mercurial.defaultrc` key with
a `*.rc` value since `mercurial.defaultrc` it became a pacakge in
1390bb81163e (help: get helptext/ data from `resources` module if
available, 2019-12-12).
Differential Revision: https://phab.mercurial-scm.org/D8856
Martin von Zweigbergk <martinvonz@google.com> [Thu, 30 Jul 2020 12:22:41 -0700] rev 45268
templatespec: use new factory functions in hooklib
Differential Revision: https://phab.mercurial-scm.org/D8853
Martin von Zweigbergk <martinvonz@google.com> [Mon, 20 Jul 2020 22:43:33 -0700] rev 45267
templatespec: use new factory functions in logcmdutil
Differential Revision: https://phab.mercurial-scm.org/D8848
Martin von Zweigbergk <martinvonz@google.com> [Mon, 20 Jul 2020 21:33:28 -0700] rev 45266
templatespec: move check for non-unicode to lower-level function
Now that we have the factory functions, it makes sense to have the
check there.
Differential Revision: https://phab.mercurial-scm.org/D8847
Martin von Zweigbergk <martinvonz@google.com> [Mon, 20 Jul 2020 21:32:10 -0700] rev 45265
templatespec: logcmdutil.templatespec() gets either template or mapfile
The callers of the function already never pass (non-`None`) values for
both, so let's check that and call the new factory functions.
Differential Revision: https://phab.mercurial-scm.org/D8846
Martin von Zweigbergk <martinvonz@google.com> [Thu, 16 Jul 2020 13:33:46 -0700] rev 45264
templatespec: create a factory function for each type there is
Most of the arguments to the `templatespec` constructor are mutually
exclusive, so each combination creates a different type of
templatespec. Let's clarify that by creating factory functions.
I've left the callers in `logcmdutil` unchanged for now because they
are more complex and `logcmdutil.templatespec()` is slightly higher
level in that it is specific to changesets.
My larger goal is to add support frozen binaries (specifically
PyOxidizer) by adding a specific type of `templatespec` for built-in
templates. That will get its own factory function.
Differential Revision: https://phab.mercurial-scm.org/D8845
Martin von Zweigbergk <martinvonz@google.com> [Wed, 29 Jul 2020 10:42:09 -0700] rev 45263
templater: stop accepting a single style to stylemap()
The code seems to have been for compatibility across
d3dbdca92458
(hgweb: don't choke when an inexistent style is requested (
issue1901),
2009-11-12).
Differential Revision: https://phab.mercurial-scm.org/D8844
Martin von Zweigbergk <martinvonz@google.com> [Thu, 23 Jul 2020 10:20:48 -0700] rev 45262
formatter: inline a variable assigned from `templater.templater.frommapfile`
The variable doesn't get reused and it doesn't help formatting, so I
don't see any reason for it.
Differential Revision: https://phab.mercurial-scm.org/D8807
Martin von Zweigbergk <martinvonz@google.com> [Wed, 22 Jul 2020 21:23:46 -0700] rev 45261
templater: don't normalize path separators to '/' when interacting with OS
`_readmapfile()` is about reading a map file from the file system, so
we shouldn't use our `util.normpath()`, which also normalizes `os.sep`
to '/'.
Differential Revision: https://phab.mercurial-scm.org/D8806
Martin von Zweigbergk <martinvonz@google.com> [Thu, 23 Jul 2020 22:50:20 -0700] rev 45260
formatter: remove now-unnecessary check for file-ness
`templater.templatepath()` now returns non-`None` only for files, so
the caller doesn't have to check.
Differential Revision: https://phab.mercurial-scm.org/D8805
Martin von Zweigbergk <martinvonz@google.com> [Thu, 23 Jul 2020 22:47:55 -0700] rev 45259
templater: make templatepath() not return directory paths
The previous patch added a test showing an unusal error message. This
make it more like other error messages.
Differential Revision: https://phab.mercurial-scm.org/D8804
Martin von Zweigbergk <martinvonz@google.com> [Thu, 23 Jul 2020 22:44:18 -0700] rev 45258
tests: show unusual error message for `hg log --style coal`
It turns out that we show the full path when the given style name
matches a subdirectory of `mercurial/templates/`.
Differential Revision: https://phab.mercurial-scm.org/D8803
Martin von Zweigbergk <martinvonz@google.com> [Wed, 22 Jul 2020 10:34:24 -0700] rev 45257
config: remove now-unused `abs` argument from `include` callback
Differential Revision: https://phab.mercurial-scm.org/D8796
Martin von Zweigbergk <martinvonz@google.com> [Wed, 22 Jul 2020 10:32:28 -0700] rev 45256
config: re-calculate absolute %include path in `include` callback
This removes the last user of the `abs` argument for the `include`
callback. The next patch will remove the argument.
Differential Revision: https://phab.mercurial-scm.org/D8795
Martin von Zweigbergk <martinvonz@google.com> [Wed, 22 Jul 2020 10:25:28 -0700] rev 45255
subrepoutil: use relative path for looking up config `%include`s
The code was already working with relative paths in practice, since it
passed in a (repo-)relative path into its local `read()` function. So
all that this patch actually does is to switch to rename variables so
we use the same path by a different name. This gets us closer to
removing the "absolute" path from the `include` callback.
Differential Revision: https://phab.mercurial-scm.org/D8794
Martin von Zweigbergk <martinvonz@google.com> [Wed, 22 Jul 2020 00:13:02 -0700] rev 45254
config: remove now-unused support for "includepaths"
This effectively undoes
081b08e4ea13 (templater: look for mapfiles in
template paths, 2015-05-15).
Differential Revision: https://phab.mercurial-scm.org/D8793
Yuya Nishihara <yuya@tcha.org> [Sat, 25 Jul 2020 22:51:26 +0900] rev 45253
dispatch: adjust ui.flush() timing to stabilize test-blackbox.t
Without this change, dispatch.dispatch() could return before flushing all
stdio data. This means chg stdio would print data after receiving the result
code.
--- tests/test-blackbox.t
+++ tests/test-blackbox.t.err
@@ -354,13 +354,13 @@
> EOF
$ hg log --debug
removing $TESTTMP/gone/.hg
- warning: cannot write to blackbox.log: $ENOENT$ (no-windows !)
warning: cannot write to blackbox.log: $TESTTMP/gone/.hg/blackbox.log: $ENOTDIR$ (windows !)
$ cd ..
blackbox should disable itself if track is empty
$ hg --config blackbox.track= init nothing_tracked
+ warning: cannot write to blackbox.log: $ENOENT$
$ cd nothing_tracked
$ cat >> .hg/hgrc << EOF
> [blackbox]
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 26 Jul 2020 12:46:04 -0700] rev 45252
clonebundles: document REQUIREDRAM key
This is a follow-up to
72feaeb510b3, which introduced the feature. The
key should be documented as part of the format specification inside the
extension docstring.
Differential Revision: https://phab.mercurial-scm.org/D8838
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 25 Jul 2020 15:37:05 +0200] rev 45251
commitctx: gather more code dealing with copy-in-extra
Now that we have a function that deal with the copy-in-extra special case, we
can gather more code meant to deal with this special case. Making the rest of
the code simpler.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 25 Jul 2020 15:33:45 +0200] rev 45250
commitctx: rename files to touched in a couple of place
This is a clearer word that we will use increasingly over this series. It also
make the old variable name available to another usage :-)
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 25 Jul 2020 15:13:25 +0200] rev 45249
commitctx: extract copy information encoding into extra into commit.py
The encoding of copy information into extra has multiple subcases and become
quite complicated (eg: empty list can be explicitly or implicitly stored for
example). In addition, it is niche experimental feature since as it affect the
hash, it is only suitable for user who don't mercurial for storage server side
(ie: Google).
Having this complexity part of the changelog will get in the way of further
cleanup. We could have to either move more of that logic into the changelog or
to move or extract more of the logic at the higher level. We take the second
approach and start gather logic in dedicated function in commit.py.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 25 Jul 2020 14:59:55 +0200] rev 45248
commitctx: create the new extra dict on its own line
A trivial move to make the next changeset easier to read.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 29 Jul 2020 15:40:13 +0200] rev 45247
commitctx: explicitly pass `manifest` to _commit_manifest
As pointed out by Yuya Nishihara.
Ian Moody <moz-ian@perix.co.uk> [Thu, 30 Jul 2020 16:58:38 +0100] rev 45246
phabricator: unconditionally pop `test_vcr` to fix debugcallconduit
11592ce6a711 / D8525 accidentally broke debugcallconduit in non-test scenarios
because it stopped popping `test_vcr` from `kwargs` unconditionally, so when
`--test-vcr` isn't set the empty string still gets passed down as the value of
`test_vcr` in `kwargs`. However unlike all the other commands debugcallconduit
doesn't have an `**opts` argument to receive it, so it aborts because of
invalid arguments.
Differential Revision: https://phab.mercurial-scm.org/D8852
Ian Moody <moz-ian@perix.co.uk> [Thu, 30 Jul 2020 16:52:12 +0100] rev 45245
phabricator: demonstrate debugcallconduit being broken without --test-vcr
This was accidentally broken by
11592ce6a711 / D8525
Differential Revision: https://phab.mercurial-scm.org/D8851
Martin von Zweigbergk <martinvonz@google.com> [Tue, 28 Jul 2020 11:11:14 -0700] rev 45244
cleanup: fix bad formatting of state.py from D8811
`test-check-format.t` was failing for me. Do I just have the wrong
version?
Differential Revision: https://phab.mercurial-scm.org/D8841
Joerg Sonnenberger <joerg@bec.de> [Thu, 30 Jul 2020 16:13:17 +0200] rev 45243
dirstate: restore original estimation and update comment
The former comment didn't reflect the content of the dirstate entries,
the two nodes are a fixed header in the file and not per-entry. Split
the documented entry into the path part and the fixed header. The
heuristic itself is still valid, e.g. for the NetBSD src tree a maximum
path size of 142 and an average of 49, resulting in 66 bytes per entry
on average.
Differential Revision: https://phab.mercurial-scm.org/D8850
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 31 Jul 2020 17:09:31 +0530] rev 45242
merge stable in default
Joerg Sonnenberger <joerg@bec.de> [Thu, 30 Jul 2020 01:10:10 +0200] rev 45241
dirstate: revert change to Rust binding
The Rust binding uses its own class and is not derived from the regular
implementation. As such, it didn't get _nodelen.
Differential Revision: https://phab.mercurial-scm.org/D8849
Martin von Zweigbergk <martinvonz@google.com> [Tue, 28 Jul 2020 10:19:49 -0700] rev 45240
relnotes: copy "next" to "5.5" and clear "next"
The same procedure as every year^Wcycle.
Differential Revision: https://phab.mercurial-scm.org/D8839