Fri, 10 Jan 2020 13:24:25 -0800 workingctx: move setparents() logic from localrepo to mirror overlayworkingctx
Martin von Zweigbergk <martinvonz@google.com> [Fri, 10 Jan 2020 13:24:25 -0800] rev 44052
workingctx: move setparents() logic from localrepo to mirror overlayworkingctx It would be nice to later be able to call `wctx.setparents()` whether `wctx` is a `workingctx` or an `overlayworkingctx`. Differential Revision: https://phab.mercurial-scm.org/D7823
Fri, 10 Jan 2020 21:41:28 -0800 overlayworkginctx: implement a setparents() to mirror dirstate.setparents()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 10 Jan 2020 21:41:28 -0800] rev 44051
overlayworkginctx: implement a setparents() to mirror dirstate.setparents() This lets us make the in-memory and on-disk code a bit more similar. I'll soon also implement setparents() on the regular workingctx. Differential Revision: https://phab.mercurial-scm.org/D7822
Fri, 10 Jan 2020 17:03:23 -0800 overlayworkingctx: default branch to base context's branch
Martin von Zweigbergk <martinvonz@google.com> [Fri, 10 Jan 2020 17:03:23 -0800] rev 44050
overlayworkingctx: default branch to base context's branch This matches what the dirstate does (it reuses working copy parent's branch unless told otherwise). By moving the default out of `rebase.commitmemorynode()`, it will let us clean that up better later. Differential Revision: https://phab.mercurial-scm.org/D7821
Thu, 09 Jan 2020 15:41:40 -0800 grep: speed up `hg grep --all-files some/path` by using ctx.matches(match)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 09 Jan 2020 15:41:40 -0800] rev 44049
grep: speed up `hg grep --all-files some/path` by using ctx.matches(match) ctx.matches(match) avoids walking unintersting parts of the tree when using tree manifests. That can make a very big difference when grepping in a small subset of the tree (2.0s -> 0.7s in my case, but can of course be made more extreme by picking a smaller subset of files). Differential Revision: https://phab.mercurial-scm.org/D7820
Thu, 09 Jan 2020 14:19:20 -0500 fix: fix grammar/typos in hg help -e fix stable
timeless <timeless@mozdev.org> [Thu, 09 Jan 2020 14:19:20 -0500] rev 44048
fix: fix grammar/typos in hg help -e fix
Thu, 09 Jan 2020 10:17:10 -0500 py3: byteify the opener option to use `rust.index` to allow Rust revlogs
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
Fri, 27 Dec 2019 21:11:36 -0800 graft: use revset for intersecting with ancestor set
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
Fri, 27 Dec 2019 21:11:33 -0800 graft: don't remove from a list in a loop
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
Fri, 27 Dec 2019 22:40:52 -0800 tests: avoid grafting the same change over and over
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
Wed, 08 Jan 2020 20:23:24 -0500 py3: byteify some `ui.configbool()` parameters
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
Mon, 23 Dec 2019 17:47:31 +0100 rust-discovery: type alias for random generator seed
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
Fri, 27 Dec 2019 15:53:16 -0800 tests: split out another ~1/2 of test-graft.t
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
Fri, 27 Dec 2019 15:39:48 -0800 tests: split out ~1/3 of test-graft.t
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
Fri, 27 Dec 2019 14:08:02 -0800 overlwayworkingctx: remove doubly bad reference to wrapped ctx for copies
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
Fri, 27 Dec 2019 12:41:56 -0800 movedirstate: get copies from dirstate before setting parents
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
Thu, 12 Dec 2019 14:31:11 -0800 fix: convert clang-format-ignorelist to use wildcards
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
Wed, 08 Jan 2020 11:59:32 -0500 packaging: update Ubuntu docker build dependencies to Python 3
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
Tue, 07 Jan 2020 12:09:36 +0100 mmap: add a size argument to mmapread
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
Tue, 07 Jan 2020 12:26:37 +0100 revlogutils: move the NodeMap class in a dedicated nodemap module
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
Thu, 02 Jan 2020 17:27:37 -0800 progress: flush stderr after clearing stable
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
Sun, 29 Dec 2019 21:10:04 -0500 rcutil: drop the `defaultrcpath()` method (API)
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
Sun, 29 Dec 2019 21:06:34 -0500 ui: add the ability to apply `defaultrc` configs from resources
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
Sun, 29 Dec 2019 20:51:44 -0500 ui: refactor `readconfig()` into a form that can consume resources
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
Sun, 29 Dec 2019 20:35:34 -0500 resourceutil: implement `contents()` to iterate over resources in a package
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
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -24 +24 +50 +100 +300 +1000 +3000 tip