- Mar 23, 2020
-
-
Raphaël Gomès authored
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
-
Raphaël Gomès authored
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
-
- Mar 20, 2020
-
-
Raphaël Gomès authored
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
-
- Mar 25, 2020
-
-
Yuya Nishihara authored
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.
-
- Mar 23, 2020
-
-
Martin von Zweigbergk authored
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
-
- Mar 24, 2020
-
-
Raphaël Gomès authored
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
-
- Mar 15, 2020
-
-
Yuya Nishihara authored
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.
-
Yuya Nishihara authored
This provides a hint for caching further computation result of the given revset. See the next patch for example.
-
Yuya Nishihara authored
So the wrapper type can return a bare smartset.
-
Yuya Nishihara authored
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.
-
- Mar 21, 2020
-
-
Matt Harbison authored
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
-
- Mar 24, 2020
-
-
Yuya Nishihara authored
-
- Mar 22, 2020
-
-
Yuya Nishihara authored
Otherwise the build would fail with -Werror=declaration-after-statement.
-
- Mar 21, 2020
-
-
Yuya Nishihara authored
It can't take more than one specs arguments per len(*specs).
-
Yuya Nishihara authored
Now 'rev(n)' is identical to 'present(_rev(n))'.
-
Yuya Nishihara authored
IndexError shouldn't be raised from a revset predicate. The error message is copied from scmutil.revsymbol().
-
Yuya Nishihara authored
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.
-
- Mar 19, 2020
-
-
Micha Wiedenmann authored
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.
-
- Mar 20, 2020
-
-
Matt Harbison authored
Not sure if we still care about C89 in general, but MSVC requires this style too. Differential Revision: https://phab.mercurial-scm.org/D8304
-
- Mar 05, 2020
-
-
Matt Harbison authored
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
-
Matt Harbison authored
Prep work for allowing multiple DREVSPECs to various commands, and properly validating the input. Differential Revision: https://phab.mercurial-scm.org/D8232
-
- Mar 20, 2020
-
-
Yuya Nishihara authored
-
- Mar 19, 2020
-
-
Matt Harbison authored
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
-
- Mar 18, 2020
-
-
Pierre-Yves David authored
Otherwise the script turns symlinks into regular files.
-
- Mar 13, 2020
-
-
Martin von Zweigbergk authored
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
-
Martin von Zweigbergk authored
`hg fix -r abc123` will format that commit but not its descendants. That seems expected given the option name (`-r`), but it's very rarely what the user wants to do. The problem is that any descendants of that commit will not be formatted, leaving them as orphans that are hard to evolve. They are hard to evolve because the new parent will have formatting changes that the orphan doesn't have. I talked to Danny Hooper (who wrote most of the fix extension) about the problem and we agreed that deprecating `-r` in favor of a new `-s` argument (mimicing rebase's `-s`) would be a good way of reducing the risk that users end up with these hard-to-evolve orphans. So that's what this patch implements. Differential Revision: https://phab.mercurial-scm.org/D8287
-
- Dec 13, 2019
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D8286
-
- Mar 18, 2020
-
-
Raphaël Gomès authored
The added `log` crate is already a sub-dependency. Differential Revision: https://phab.mercurial-scm.org/D8300
-
Augie Fackler authored
Python 3.8 makes os.path.isfile quietly eat "path invalid" errors and return False instead of allowing the exception to propagate. Given that this is a change from 2018 (sigh) and it's mentioned in the release notes (double sigh) we're definitely too late to complain to Python about the behavior change, so open-code part of os.path.isfile() in this method so we can catch invalid-path errors and handle them appropriately. I confirmed that posixpath and ntpath both delegate to genericpath, which uses os.stat() under the covers. Differential Revision: https://phab.mercurial-scm.org/D8302
-
- Mar 17, 2020
-
-
Augie Fackler authored
As best I can discern, this is not going to hurt anything, but it'll cause a couple of options to exist in the UI that are nonsensical. That seems fine, given the nature of remotefilelog. Differential Revision: https://phab.mercurial-scm.org/D8299
-
Augie Fackler authored
It's not uncommon for hg users to rely on hgweb as a simple GUI and history browser (I do this all the time on Mercurial), but we lack any tests to ensure things keep working. At present, this merely demonstrates the "view contents of a single file" endpoint is broken. I'll fix that in a subsequent change. Differential Revision: https://phab.mercurial-scm.org/D8298
-
- Mar 18, 2020
-
-
Augie Fackler authored
Fixes things on Python 3. Differential Revision: https://phab.mercurial-scm.org/D8301
-
- Mar 12, 2020
-
-
Pierre-Yves David authored
Before this change, revlog index corruption could be silently ignored in some situation. Differential Revision: https://phab.mercurial-scm.org/D8276
-
Pierre-Yves David authored
Now what we run the test from the root, we need to list test name from the root. Differential Revision: https://phab.mercurial-scm.org/D8275
-
- Mar 06, 2020
-
-
Raphaël Gomès authored
For now, we can only provide support for Linux in `hg-core`, so we have to be explicit about it in case anyone wonders why their Dirstate is suddenly broken, or why the crate does not compile (on Windows for example). Differential Revision: https://phab.mercurial-scm.org/D8246
-
- Mar 17, 2020
-
-
Kyle Lippincott authored
Differential Revision: https://phab.mercurial-scm.org/D8296
-
- Jul 22, 2019
-
-
Kyle Lippincott authored
Differential Revision: https://phab.mercurial-scm.org/D8297
-
- Mar 13, 2020
-
-
Kyle Lippincott authored
Differential Revision: https://phab.mercurial-scm.org/D8294
-
- Mar 14, 2020
-
-
Kyle Lippincott authored
Differential Revision: https://phab.mercurial-scm.org/D8280
-
- Mar 13, 2020
-
-
Kyle Lippincott authored
I think every item here is considered incorrect (if we fix doctest to run it), so let's just delete it. Differential Revision: https://phab.mercurial-scm.org/D8279
-