Wed, 25 Mar 2020 12:05:53 -0400 tests: update test-archive.t expectations for python3.9 changes
Augie Fackler <augie@google.com> [Wed, 25 Mar 2020 12:05:53 -0400] rev 44611
tests: update test-archive.t expectations for python3.9 changes Sigh. Differential Revision: https://phab.mercurial-scm.org/D8328
Wed, 25 Mar 2020 11:56:47 -0400 setup: relax -Werror for declaration-after-statement on Python 3.9
Augie Fackler <augie@google.com> [Wed, 25 Mar 2020 11:56:47 -0400] rev 44610
setup: relax -Werror for declaration-after-statement on Python 3.9 It turns out Python 3.9 introduces such declarations in the headers, eg cpython/abstract.h:189:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] so we have to be more relaxed when compiling for 3.9. Differential Revision: https://phab.mercurial-scm.org/D8327
Wed, 25 Mar 2020 08:28:20 -0700 pvec: drop an unused `from __future__ import division`
Martin von Zweigbergk <martinvonz@google.com> [Wed, 25 Mar 2020 08:28:20 -0700] rev 44609
pvec: drop an unused `from __future__ import division` This module only uses the `//` operator (for integer division). Differential Revision: https://phab.mercurial-scm.org/D8326
Tue, 24 Mar 2020 23:31:36 -0700 py3: use integer division in histedit
Martin von Zweigbergk <martinvonz@google.com> [Tue, 24 Mar 2020 23:31:36 -0700] rev 44608
py3: use integer division in histedit Histedit uses the `/` operator, which does type conversion to float in Python 3 instead of integer division likeon Python 2. Let's preserve the Python 2 behavior by importing and using the `//` operator. Differential Revision: https://phab.mercurial-scm.org/D8324
Wed, 25 Mar 2020 10:06:32 +0100 rust: update README to reflect use of `regex` crate
Raphaël Gomès <rgomes@octobus.net> [Wed, 25 Mar 2020 10:06:32 +0100] rev 44607
rust: update README to reflect use of `regex` crate Differential Revision: https://phab.mercurial-scm.org/D8325
Mon, 23 Mar 2020 12:11:41 +0100 rust: update all dependencies
Raphaël Gomès <rgomes@octobus.net> [Mon, 23 Mar 2020 12:11:41 +0100] rev 44606
rust: update all dependencies We do this periodically to say up to date. No major versions were crossed this time per se, but the `rand` is still in v0, and their 0.7x series broke three things: - Some distribution-related elements were moved to a separate crate, flashing a deprecation warning - The `LogNormal::new` associated function now returns a `Result` - Certain RNGs were updated to sample a `u32` instead of `usize` when their upper-bound is less than `u32::MAX` for better portability, which changed the output for 2 tests. Moreover, the recent use of the `regex` crate for ignore mechanisms prompted some benchmarking that revealed that `regex` was slower at compiling big regex than `Re2`. The author of `regex` was very quick to discover an optimization that yielded a 30% improvement. It's still slower than `Re2` in that regard, but less so in the 1.3.6 release. Differential Revision: https://phab.mercurial-scm.org/D8320
Mon, 23 Mar 2020 12:07:45 +0100 rust: update micro-timer dependency
Raphaël Gomès <rgomes@octobus.net> [Mon, 23 Mar 2020 12:07:45 +0100] rev 44605
rust: update micro-timer dependency The new version uses a much more robust technique and should remove any existing risk of bad compiler error or performance hit. Differential Revision: https://phab.mercurial-scm.org/D8319
Fri, 20 Mar 2020 15:21:34 +0100 rust-status: only involve ignore mechanism when needed
Raphaël Gomès <rgomes@octobus.net> [Fri, 20 Mar 2020 15:21:34 +0100] rev 44604
rust-status: only involve ignore mechanism when needed This prevents unnecessary fallbacks to Python, improving performance for `hg update` for instance. On Mozilla-Central a noop update goes from 1.6s down to 700ms. Differential Revision: https://phab.mercurial-scm.org/D8315
Thu, 26 Mar 2020 00:07:12 +0900 templater: fix cbor() filter to recursively convert smartset to list
Yuya Nishihara <yuya@tcha.org> [Thu, 26 Mar 2020 00:07:12 +0900] rev 44603
templater: fix cbor() filter to recursively convert smartset to list The previous attempt, e3e44e6e7245 "templater: fix cbor() filter to accept smartset", was incomplete since obj may be a collection containing a smartset. This works around the problem by converting smartsets recursively. Another option is to teach cborutil how to encode a smartset. That should be okay, but I hesitated to add "import smartset" to cborutil.py as the cborutil is pretty generic.
Mon, 23 Mar 2020 15:14:42 -0700 shelve: split up dounshelve() in unshelvecmd() and _dounshelve()
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Mar 2020 15:14:42 -0700] rev 44602
shelve: split up dounshelve() in unshelvecmd() and _dounshelve() I'd like to be able to override the new `_dounshelve()`, getting access to the name of the shelve to unshelve. `unshelvecmd()` seems to better match the existing `createcmd()`, `listcmd()` etc. Differential Revision: https://phab.mercurial-scm.org/D8322
Tue, 24 Mar 2020 17:55:59 +0100 rust-matchers: use the `regex` crate
Raphaël Gomès <rgomes@octobus.net> [Tue, 24 Mar 2020 17:55:59 +0100] rev 44601
rust-matchers: use the `regex` crate Instead of falling back to Python when a code path with "ignore" functionality is reached and `Re2` is not installed, the default compilation (i.e. without the `with-re2` feature) will use the `regex` crate for all regular expressions business. As with the introduction of `Re2` in a previous series, this yields a big performance boost compared to the Python + C code in `status`, `diff`, `commit`, `update`, and maybe others. For now `Re2` looks to be faster at compiling the DFA (1.5ms vs 5ms for Netbeans' `.hgignore`) and a bit faster in actual use: (123ms vs 137ms for the parallel traversal of Netbeans' clean repo). I am in talks with the author of `regex` to see whether that performance difference is a bug, a "won't fix", or a tuning issue. The `regex` crate is already one of our dependencies and using this code does not require any additional work from the end-user than to use the Rust extensions. Differential Revision: https://phab.mercurial-scm.org/D8323
Sun, 15 Mar 2020 16:11:58 +0900 templater: add subsetparents(rev, revset) function
Yuya Nishihara <yuya@tcha.org> [Sun, 15 Mar 2020 16:11:58 +0900] rev 44600
templater: add subsetparents(rev, revset) function Naming suggestions are welcome. And this could be flagged as an (ADVANCED) function since the primary use case is to draw a graph. This provides all data needed for drawing revisions graph filtered by revset, and allows us to implement a GUI graph viewer in some languages better than Python. A frontend grapher will be quite similar to our graphmod since subsetparents() just returns parent-child relations in the filtered sub graph. Frontend example: https://hg.sr.ht/~yuja/hgv/browse/default/core/hgchangesetgrapher.cpp However, the resulting graph will be simpler than the one "hg log -G" would generate because redundant edges are eliminated. This should be the same graph rendering strategy as TortoiseHg. This function could be implemented as a revset predicate, but that would mean the scanning state couldn't be cached and thus slow. Test cases are split to new file since test-template-functions.t is quite big and we'll need a new branchy repository anyway.
Sun, 15 Mar 2020 16:00:45 +0900 templater: remember cache key of evaluated revset
Yuya Nishihara <yuya@tcha.org> [Sun, 15 Mar 2020 16:00:45 +0900] rev 44599
templater: remember cache key of evaluated revset This provides a hint for caching further computation result of the given revset. See the next patch for example.
Sun, 15 Mar 2020 22:01:38 +0900 templater: fix cbor() filter to accept smartset
Yuya Nishihara <yuya@tcha.org> [Sun, 15 Mar 2020 22:01:38 +0900] rev 44598
templater: fix cbor() filter to accept smartset So the wrapper type can return a bare smartset.
Sun, 15 Mar 2020 15:12:44 +0900 templater: introduce wrapper for smartset (API)
Yuya Nishihara <yuya@tcha.org> [Sun, 15 Mar 2020 15:12:44 +0900] rev 44597
templater: introduce wrapper for smartset (API) I want to add a template function which takes a revset as an argument: {somefunc(..., revset(...))} ^^^^^^^^^^^ evaluates to a revslist This wrapper will provide a method to get an underlying smartset. It should also be good for performance since count(revset(...)) will no longer have to fully consume the smartset for example, but that isn't the point of this change.
Fri, 20 Mar 2020 23:30:23 -0400 setup: build C extensions with -Werror=declaration-after-statement
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Mar 2020 23:30:23 -0400] rev 44596
setup: build C extensions with -Werror=declaration-after-statement MSVC 2008 still needs declarations at the top of the scope. I added it to the 3rd party code too in case somebody vendors a new version with a problem- they'll get an early warning. Clang seems to ignore this (at least on 10.14 with Xcode 10), and gcc 7.4 will error out as desired on Ubuntu 18.04. Thanks to Yuya for remembering the name of the option. Differential Revision: https://phab.mercurial-scm.org/D8318
Tue, 24 Mar 2020 21:41:24 +0900 merge with stable
Yuya Nishihara <yuya@tcha.org> [Tue, 24 Mar 2020 21:41:24 +0900] rev 44595
merge with stable
Sun, 22 Mar 2020 18:40:04 +0900 osutil: move declaration to top of the scope
Yuya Nishihara <yuya@tcha.org> [Sun, 22 Mar 2020 18:40:04 +0900] rev 44594
osutil: move declaration to top of the scope Otherwise the build would fail with -Werror=declaration-after-statement.
Sat, 21 Mar 2020 14:01:10 +0900 phabricator: remove *-argument from _getdrevs()
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Mar 2020 14:01:10 +0900] rev 44593
phabricator: remove *-argument from _getdrevs() It can't take more than one specs arguments per len(*specs).
Sat, 21 Mar 2020 13:42:08 +0900 revset: leverage internal _rev() function to implement rev()
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Mar 2020 13:42:08 +0900] rev 44592
revset: leverage internal _rev() function to implement rev() Now 'rev(n)' is identical to 'present(_rev(n))'.
Sat, 21 Mar 2020 13:39:39 +0900 revset: fix crash by repo.revs('%d', tip + 1)
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Mar 2020 13:39:39 +0900] rev 44591
revset: fix crash by repo.revs('%d', tip + 1) IndexError shouldn't be raised from a revset predicate. The error message is copied from scmutil.revsymbol().
Sat, 21 Mar 2020 13:27:47 +0900 revset: allow repo.revs('%d', wdirrev)
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Mar 2020 13:27:47 +0900] rev 44590
revset: allow repo.revs('%d', wdirrev) Otherwise we can't write repo.revs('null:%d', subset.max()) to build a smartset covering the range {null .. tip} + {wdir} if subset includes wdir.
Thu, 19 Mar 2020 16:06:24 +0100 ui: use "procutil.shellsplit" to parse command
Micha Wiedenmann <mw-u2@posteo.de> [Thu, 19 Mar 2020 16:06:24 +0100] rev 44589
ui: use "procutil.shellsplit" to parse command A commandline containing a space ('"C:\\Program Files\\bar.exe" "..."') must not simply split at whitespace, instead quoting has to be taken into account. Use "shlex.split()" to parse it instead. This can improve the error message if we fail to launch a user configured editor which does not exist. Consider [ui] editor = "C:\Program Files\editor\editor.exe" where the path does not exist. "hg histedit" currently aborts with > Abort: edit failed: Program exited with status 1 here "Program" is not part of the message but the name of the program that failed (i.e. `basename("C:\\Program ")`). With this change the message instead reads > Abort: edit failed: C:\Program Files\editor\editor.exe exited with > status 1 which is also not ideal since infact "cmd.exe" exited with code 1, not the editor. But the real error message ("File not found") gets swallowed by `procutil` and including the correct path improves the error message nevertheless.
Thu, 05 Mar 2020 11:02:07 -0500 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com> [Thu, 05 Mar 2020 11:02:07 -0500] rev 44588
phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate Per Augie's request. Like regular revsets, the result is the union of all given specs. Unlike regular revsets, these don't resolve in parent -> child order, and should be specified as such on the command line. This change invalidated a previous test using an empty `hg phabread`, so it has been switched to `hg debugcallconduit` to preserve that coverage. Differential Revision: https://phab.mercurial-scm.org/D8233
Thu, 05 Mar 2020 11:00:00 -0500 phabricator: add a helper function to convert DREVSPECs to a DREV dict list
Matt Harbison <matt_harbison@yahoo.com> [Thu, 05 Mar 2020 11:00:00 -0500] rev 44587
phabricator: add a helper function to convert DREVSPECs to a DREV dict list Prep work for allowing multiple DREVSPECs to various commands, and properly validating the input. Differential Revision: https://phab.mercurial-scm.org/D8232
Fri, 20 Mar 2020 17:18:14 +0900 merge with stable
Yuya Nishihara <yuya@tcha.org> [Fri, 20 Mar 2020 17:18:14 +0900] rev 44586
merge with stable
Thu, 19 Mar 2020 14:54:10 -0400 tests: avoid logging a commit with a Unicode character in test-phabricator.t
Matt Harbison <matt_harbison@yahoo.com> [Thu, 19 Mar 2020 14:54:10 -0400] rev 44585
tests: avoid logging a commit with a Unicode character in test-phabricator.t The previous output was generated on Windows, and should have been wrapped in `HGENCODING=utf-8` like it is earlier in the test. It's simpler to just avoid it. I only noticed the output change when I got around to running it on a Mac. Differential Revision: https://phab.mercurial-scm.org/D8303
Fri, 13 Mar 2020 12:16:20 -0700 fix: mark -r as advanced
Martin von Zweigbergk <martinvonz@google.com> [Fri, 13 Mar 2020 12:16:20 -0700] rev 44584
fix: mark -r as advanced See the previous patch for reasoning. I planned to even mark it deprecated, but someone (timeless?) on the #mercurial IRC channel said they sometimes wanted to use `-r` with its existing semantics. Differential Revision: https://phab.mercurial-scm.org/D8288
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -28 +28 +50 +100 +300 +1000 +3000 tip