Thu, 27 Sep 2018 16:56:15 +0200 rust: exposing in parsers module
Georges Racinet <gracinet@anybox.fr> [Thu, 27 Sep 2018 16:56:15 +0200] rev 40273
rust: exposing in parsers module To build with the Rust code, set the HGWITHRUSTEXT environment variable. At this point, it's possible to instantiate and use a rustlazyancestors object from a Python interpreter. The changes in setup.py are obviously a quick hack, just good enough to test/bench without much refactoring. We'd be happy to improve on that with help from the community. Rust bindings crate gets compiled as a static library, which in turn gets linked within 'parsers.so' With respect to the plans at https://www.mercurial-scm.org/wiki/OxidationPlan this would probably qualify as "roll our own FFI". Also, it doesn't quite meet the target of getting rid of C code, since it brings actually more, yet: - the new C code does nothing else than parsing arguments and calling Rust functions. In particular, there's no complex allocation involved. - subsequent changes could rewrite more of revlog.c, this time resulting in an overall decrease of C code and unsafety.
Thu, 27 Sep 2018 16:51:36 +0200 rust: iterator bindings to C code
Georges Racinet <gracinet@anybox.fr> [Thu, 27 Sep 2018 16:51:36 +0200] rev 40272
rust: iterator bindings to C code In this changeset, still made of Rust code only, we expose the Rust iterator for instantiation and consumption from C code. The idea is that both the index and index_get_parents() will be passed from the C extension, hence avoiding a hard link dependency to parsers.so, so that the crate can still be built and tested independently. On the other hand, parsers.so will use the symbols defined in this changeset.
Thu, 27 Sep 2018 17:03:16 +0200 rust: pure Rust lazyancestors iterator
Georges Racinet <gracinet@anybox.fr> [Thu, 27 Sep 2018 17:03:16 +0200] rev 40271
rust: pure Rust lazyancestors iterator This is the first of a patch series aiming to provide an alternative implementation in the Rust programming language of the _lazyancestorsiter from the ancestor module. This iterator has been brought to our attention by the people at Octobus, as a potential good candidate for incremental "oxydation" (rewriting in Rust), because it has shown performance issues lately and it merely deals with ints (revision numbers) obtained by calling the index, whih should be directly callable from Rust code, being itself implemented as a C extension. The idea behind this series is to provide a minimal example of Rust code collaborating with existing C and Python code. To open the way to gradually rewriting more of Mercurial's Python code in Rust, without being forced to pay a large initial cost of rewriting the existing fast core into Rust. This patch does not introduce any bindings to other Mercurial code yet. Instead, it introduces the necessary abstractions to address the problem independently, and unit-test it. Since this is the first use of Rust as a Python module within Mercurial, the hg-core crate gets created within this patch. See its Cargo.toml for more details. Someone with a rustc/cargo installation may chdir into rust/hg-core and run the tests by issuing: cargo test --lib The algorithm is a bit simplified (see details in docstrings), and at its simplest becomes rather trivial, showcasing that Rust has batteries included too: BinaryHeap, the Rust analog of Python's heapq does actually all the work. The implementation can be further optimized and probably be made more idiomatic Rust.
Sat, 13 Oct 2018 23:08:29 -0400 run-tests: restore quoting the python executable for running *.py tests
Matt Harbison <matt_harbison@yahoo.com> [Sat, 13 Oct 2018 23:08:29 -0400] rev 40270
run-tests: restore quoting the python executable for running *.py tests This was accidentally dropped in 8cf459d8b111.
Sat, 13 Oct 2018 19:49:33 -0400 tests: replace `cd ..` with an absolute path in a couple ssh tests
Matt Harbison <matt_harbison@yahoo.com> [Sat, 13 Oct 2018 19:49:33 -0400] rev 40269
tests: replace `cd ..` with an absolute path in a couple ssh tests These tests are broken under py3 on Windows to the point where the `cd ..` was actually escaping into the system wide $TEMP. The subsequent `hg init` created a repo there, and then added a local extension to the hgrc. This breaks every single subsequent test when it tries to `hg init` in its $TESTTMP, and can't load the localwrite.py extension. And since I botched this the first time and replaced the wrong `cd ..`, this just replaces all of them. I've noticed test garbage in $TEMP recently, and maybe this will help. Perhaps `hg init` shouldn't load the config for the local repo, but this is an easy enough workaround for now.
Thu, 04 Oct 2018 00:17:26 -0400 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com> [Thu, 04 Oct 2018 00:17:26 -0400] rev 40268
lfs: register the flag processors per repository Previously, enabling the extension for any repo in commandserver or hgweb would enable the flags on all repos. Since localrepo.resolverevlogstorevfsoptions() is called so early, the check to see if the extension is enabled on the repo (which hasn't been instantiated yet) is a bit awkward. But I don't see a better way.
Tue, 09 Oct 2018 21:53:21 -0400 revlog: allow flag processors to be applied via store options
Matt Harbison <matt_harbison@yahoo.com> [Tue, 09 Oct 2018 21:53:21 -0400] rev 40267
revlog: allow flag processors to be applied via store options This allows flag processors to be registered to specific repos in an extension by wrapping localrepo.resolverevlogstorevfsoptions(). I wanted to add the processors via a function on localrepo, but some of the places where the processors are globally registered don't have a repository available. This makes targeting specific repos in the wrapper awkward, but still manageable.
Fri, 12 Oct 2018 17:34:45 -0400 py3: use str to query registry values on Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 12 Oct 2018 17:34:45 -0400] rev 40266
py3: use str to query registry values on Windows This blew up launching any command if extdiff processed a tool with a regkey config.
Sat, 13 Oct 2018 16:57:28 +0200 py3: convert "usage" literal to bytes
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Oct 2018 16:57:28 +0200] rev 40265
py3: convert "usage" literal to bytes Here _() is practically an identity function, but we shouldn't pass in unicode to _().
Sat, 13 Oct 2018 09:47:53 -0400 churn: remove redundant round()
Augie Fackler <augie@google.com> [Sat, 13 Oct 2018 09:47:53 -0400] rev 40264
churn: remove redundant round() To my surprise, the int() is required. Spotted by Mads when he reviewed D5063. Thanks! Differential Revision: https://phab.mercurial-scm.org/D5086
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip