Matt Harbison <matt_harbison@yahoo.com> [Thu, 09 Jan 2020 10:17:10 -0500] rev 44047
py3: byteify the opener option to use `rust.index` to allow Rust revlogs
It looks like this corresponds to the byteified key written in localrepo in
8042856c90b6.
Differential Revision: https://phab.mercurial-scm.org/D7818
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Dec 2019 21:11:36 -0800] rev 44046
graft: use revset for intersecting with ancestor set
This addresses a TODO added in
a1381eea7c7d (graft: do not use
`.remove` on a smart set (regression), 2014-04-28).
Differential Revision: https://phab.mercurial-scm.org/D7806
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Dec 2019 21:11:33 -0800] rev 44045
graft: don't remove from a list in a loop
This addresses a TODO added in
a1381eea7c7d (graft: do not use
`.remove` on a smart set (regression), 2014-04-28). I couldn't measure
any speedup.
Differential Revision: https://phab.mercurial-scm.org/D7805
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Dec 2019 22:40:52 -0800] rev 44044
tests: avoid grafting the same change over and over
The test case added in
a1381eea7c7d (graft: do not use `.remove` on a
smart set (regression), 2014-04-28) added a test case that grafted the
same change (renaming 'a' to 'b') three times over. It had description
"graft works on complex revset", but AFACT, all that it cared about
was that some ancestor of the working copy was in the set of revisions
to graft. So this patch changes the test to do that instead.
(I plan to later make it so that grafting these renames on top of each
won't create the empty commits they currently create.)
Differential Revision: https://phab.mercurial-scm.org/D7804
Matt Harbison <matt_harbison@yahoo.com> [Wed, 08 Jan 2020 20:23:24 -0500] rev 44043
py3: byteify some `ui.configbool()` parameters
This popped up in
8042856c90b6.
Differential Revision: https://phab.mercurial-scm.org/D7817
Georges Racinet <georges.racinet@octobus.net> [Mon, 23 Dec 2019 17:47:31 +0100] rev 44042
rust-discovery: type alias for random generator seed
It just makes our life easier
Differential Revision: https://phab.mercurial-scm.org/D7715
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Dec 2019 15:53:16 -0800] rev 44041
tests: split out another ~1/2 of test-graft.t
The tests involving renames were also quite independent from the rest.
Differential Revision: https://phab.mercurial-scm.org/D7803
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Dec 2019 15:39:48 -0800] rev 44040
tests: split out ~1/3 of test-graft.t
test-graft.t is ~2400 lines and takes 34s to run. This patch moves the
last ~1/3 of it to a separate file. The parts now run in 22s + 13s. On
top of that, we can remove the #testcases from the old file, so it's
only 22s + 2*13s instead of the 2*34s it was before.
Differential Revision: https://phab.mercurial-scm.org/D7802
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Dec 2019 14:08:02 -0800] rev 44039
overlwayworkingctx: remove doubly bad reference to wrapped ctx for copies
`_wrappedctx` lives on overlwayworkingctx, not on the repo object, so
we should access it as `._wrappedctx`, not `._repo._wrappedctx`. More
importantly, the overlayworkingctx is relative to its base, not
including it, so the copies returned should not include copies made in
the base.
Differential Revision: https://phab.mercurial-scm.org/D7801
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Dec 2019 12:41:56 -0800] rev 44038
movedirstate: get copies from dirstate before setting parents
Setting dirstate parents can modify the copies recorded in the
dirstate when there are two dirstate parents. I don't think we ever
call movedirstate() when there is more than one parent, but it seems
clearer to get the copies from the dirstate first anyway.
Differential Revision: https://phab.mercurial-scm.org/D7800
Kyle Lippincott <spectral@google.com> [Thu, 12 Dec 2019 14:31:11 -0800] rev 44037
fix: convert clang-format-ignorelist to use wildcards
It's very brittle to specify the exact filenames for these vendored/thirdparty
libraries; when there's an upgrade, it's likely not going to be updated.
Differential Revision: https://phab.mercurial-scm.org/D7619
Connor Sheehan <sheehan@mozilla.com> [Wed, 08 Jan 2020 11:59:32 -0500] rev 44036
packaging: update Ubuntu docker build dependencies to Python 3
Changeset
7574ccd87200f02e updated the Debian docker builds to Python 3. In doing
so, the Ubuntu docker-based builds broke, as the Dockerfile does not
include the new dependencies as specified in `contrib/packaging/debian/control`.
This commit changes the dependencies in the Ubuntu Dockerfile template
to their Python 3 equivalents, fixing `make docker-ubuntu-bionic`.
Differential Revision: https://phab.mercurial-scm.org/D7810
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 07 Jan 2020 12:09:36 +0100] rev 44035
mmap: add a size argument to mmapread
With this argument, we can control the size of the mmap created. (previously it
was always the whole file.
Differential Revision: https://phab.mercurial-scm.org/D7808
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 07 Jan 2020 12:26:37 +0100] rev 44034
revlogutils: move the NodeMap class in a dedicated nodemap module
We will introduce more nodemap related code, so it make sense to move the
existing code in that module first.
Differential Revision: https://phab.mercurial-scm.org/D7809
Kyle Lippincott <spectral@google.com> [Thu, 02 Jan 2020 17:27:37 -0800] rev 44033
progress: flush stderr after clearing
On python3, ui.stderr is buffered, it seems, so we need to flush it to actually
get the progress bar off the screen. This is important since ui.write() will
call into progbar.clear() if it thinks there's a progress bar on the screen,
with the intent that the next thing it outputs is at the beginning of the line
(instead of at the end of the progress bar line). Without the flush, we buffer
up the clearing of the screen, and we get some really weird/corrupt output.
Differential Revision: https://phab.mercurial-scm.org/D7784
Matt Harbison <matt_harbison@yahoo.com> [Sun, 29 Dec 2019 21:10:04 -0500] rev 44032
rcutil: drop the `defaultrcpath()` method (API)
The resource based code can service py2, py3 and an oxidized executable, so
there's no reason to leave this around. It was flagged as an API change when it
was introduced, so flagging it again.
Differential Revision: https://phab.mercurial-scm.org/D7777
Matt Harbison <matt_harbison@yahoo.com> [Sun, 29 Dec 2019 21:06:34 -0500] rev 44031
ui: add the ability to apply `defaultrc` configs from resources
We will want the ability to cat out these resources, but the same would apply to
templates, so I'm going to wait for the dust to settle on that. Reading the
default config directly from the filesystem is still in place for now.
Differential Revision: https://phab.mercurial-scm.org/D7776
Matt Harbison <matt_harbison@yahoo.com> [Sun, 29 Dec 2019 20:51:44 -0500] rev 44030
ui: refactor `readconfig()` into a form that can consume resources
The old form can't completely go away, because files outside of packages still
need to be read. The name passed in here is a tuple of `package name, resource`
as needed by the resource API.
I like the idea of stating the config file is embedded in the executable by
listing is as `exe!package.resource`. This would be consistent with how
`debuginstall` points to the executable for the python executable, lib, and
installed modules. While in practice the filesystem path is available from the
backing ResourceReader when the resource is opened, it is a relative path on py2
and absolute on py3. Further, while this would show in the `hg config` output
for each option if set as such here, it doesn't show in the `reading from...`
line when `--debug` is used. The file isn't actually open where that prints, so
there's no way I see to get that info there. So I opted for the simple prefix
to distinguish resources from files.
Differential Revision: https://phab.mercurial-scm.org/D7775
Matt Harbison <matt_harbison@yahoo.com> [Sun, 29 Dec 2019 20:35:34 -0500] rev 44029
resourceutil: implement `contents()` to iterate over resources in a package
Differential Revision: https://phab.mercurial-scm.org/D7774
Matt Harbison <matt_harbison@yahoo.com> [Sun, 29 Dec 2019 20:32:56 -0500] rev 44028
resourceutil: implement `is_resource()`
This will be needed when iterating resources.
Differential Revision: https://phab.mercurial-scm.org/D7773
Matt Harbison <matt_harbison@yahoo.com> [Sat, 28 Dec 2019 23:35:13 -0500] rev 44027
resourceutil: don't limit resources to the `mercurial` package
This should make things a little clearer, in that it now requires the full
package name to access a resource. But the real motivation is that
`extensions._disabledpaths()` walks the `hgext` directory looking for bundled
extensions. This in turn feeds, among other things:
1) Listing disabled extensions in `hg help extensions`
2) Indicating that an unknown command is in a non-enabled extension
3) Displaying help for non-enabled extensions
4) Generating documentation
5) Announcing LFS is auto-enabled (or not) when cloning from an LFS source
The filesystem based ResourceReader will happily return *.py and *.pyc, but the
one supplied by PyOxidizer doesn't. Presumably we can change that. The only
other idea I had here is for setup.py to generate a text file containing the
list of extensions, but that doesn't seem great when running from source.
Differential Revision: https://phab.mercurial-scm.org/D7772
Matt Harbison <matt_harbison@yahoo.com> [Sat, 28 Dec 2019 23:08:57 -0500] rev 44026
setup: include `defaultrc` in the package list
This is needed to access the config files via the resourceutil framework, which
is needed to embed the config files when uing PyOxidizer.
Differential Revision: https://phab.mercurial-scm.org/D7771
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 24 Dec 2019 20:17:40 +0300] rev 44025
tests: update test-releasenotes-formatting.t output
The output seems to be left outdated because running this test requires
fuzzy-wuzzy which is not generally installed.
Differential Revision: https://phab.mercurial-scm.org/D7723
Matt Harbison <matt_harbison@yahoo.com> [Sat, 28 Dec 2019 02:11:51 -0500] rev 44024
tests: fix a copy/paste name duplication in storage.py
Flagged by PyCharm as a redeclared name without usage, because the name matches
the function immediately preceding it. But since this differs by doing regular
reads instead of raw reads, I assume we still want it. But I don't see either
function being called anywhere.
Differential Revision: https://phab.mercurial-scm.org/D7769