D7782: rust-core: extracted a revlog submodule

2020-01-03 Thread Raphaël Gomès
Alphare added a comment. Alphare accepted this revision. It appears that the phabricator UI does not show the last line, so everything is fine. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7782/new/ REVISION DETAIL https://phab.mercurial-scm.org/D

D7782: rust-core: extracted a revlog submodule

2020-01-03 Thread Raphaël Gomès
Alphare added a comment. Since there is no newline at the end of `revlog.rs`, I can assume `rustfmt` would be unhappy about this patch. Maybe I'm wrong? Otherwise, the patch looks good, `hg-core` needs a refactor. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial

D7530: rust-dirstate-status: update bridge for new rust version of `dirstate.status`

2019-12-17 Thread Raphaël Gomès
Closed by commit rHG6a88ced33c40: rust-dirstate-status: update bridge for new rust version of `dirstate.status` (authored by Alphare). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOS

D7531: rust-matchers: add support for `exactmatcher` in `dirstate.status`

2019-12-17 Thread Raphaël Gomès
Closed by commit rHG40fd1ef4e4c1: rust-matchers: add support for `exactmatcher` in `dirstate.status` (authored by Alphare). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG

D7529: rust-dirstate-status: add `walk_explicit` implementation, use `Matcher` trait

2019-12-17 Thread Raphaël Gomès
Closed by commit rHG8c77826116f7: rust-dirstate-status: add `walk_explicit` implementation, use `Matcher` trait (authored by Alphare). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOS

D7528: rust-matchers: add `FileMatcher` implementation

2019-12-17 Thread Raphaël Gomès
Closed by commit rHG69c4f3cf2cdf: rust-matchers: add `FileMatcher` implementation (authored by Alphare). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial CHANGES

D7678: rust-warnings: fix warnings in tests

2019-12-16 Thread Raphaël Gomès
Closed by commit rHGd8a96cebf75d: rust-warnings: fix warnings in tests (authored by Alphare). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial CHANGES SINCE LAST

D7678: rust-warnings: fix warnings in tests

2019-12-16 Thread Raphaël Gomès
Alphare created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY It turns out that I also missed those warnings inside tests. This should be the last of them. One day we will get rid of this interface anyway.

D7611: py3: pass bytes to `configint` and `configbool`

2019-12-13 Thread Raphaël Gomès
Closed by commit rHG578c42f998d9: py3: pass bytes to `configint` and `configbool` (authored by Alphare). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial CHANGES

D7612: py3: send bytes from Rust-created warning patterns

2019-12-13 Thread Raphaël Gomès
Closed by commit rHGa264e8a91798: py3: send bytes from Rust-created warning patterns (authored by Alphare). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial CHAN

D7610: rust-threads: force Rayon to respect the worker count in config

2019-12-13 Thread Raphaël Gomès
Closed by commit rHG37cbf45bb858: rust-threads: force Rayon to respect the worker count in config (authored by Alphare). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Me

D7609: rust-dirs: handle forgotten `Result`s

2019-12-13 Thread Raphaël Gomès
Closed by commit rHGbc7d8f45c3b6: rust-dirs: handle forgotten `Result`s (authored by Alphare). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial CHANGES SINCE LAS

D7609: rust-dirs: handle forgotten `Result`s

2019-12-13 Thread Raphaël Gomès
Alphare updated this revision to Diff 18686. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7609?vs=18633&id=18686 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7609/new/ REVISION DETAIL https://phab.mercurial-scm.org/D76

D7576: hg-core: add configparser to library

2019-12-12 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > Alphare wrote in Cargo.toml:14 > I wonder about this dependency. It uses 4 `usize` for every slice of bytes, > and adds some overhead, albeit minimal, that I am trying to justify. > Are we looking at reaping the benefits down the line? The crate i

Re: [PATCH 1 of 5 STABLE] rust-threads: force Rayon to respect the worker count in config

2019-12-12 Thread Raphaël Gomès
I'm abandoning this mail series because it was confusing, as the old Phabricator revisions are still there. I will re-send through Phabricator. On 12/12/19 5:46 PM, Raphaël Gomès wrote: # HG changeset patch # User Raphaël Gomès # Date 1573399814 28800 # Sun Nov 10 07:30:14 2019

D7610: rust-threads: force Rayon to respect the worker count in config

2019-12-12 Thread Raphaël Gomès
Alphare added a comment. This entire series is a graft of existing changesets onto stable, to fix the current CI for the Rust module policy. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7610/new/ REVISION DETAIL https://phab.mercurial-scm.org/D761

D7614: rust-cpython: do not convert warning pattern to utf-8 bytes

2019-12-12 Thread Raphaël Gomès
Alphare created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY On Unix, both Rust Path and Mercurial expect a locale-dependent bytes, and we don't support Windows yet. REPOSITORY rHG Mercurial BRANCH st

D7613: rust-cpython: import utils::files::* function at module level

2019-12-12 Thread Raphaël Gomès
Alphare created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY IIRC, it's common in Rust to call functions with the module prefix. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.me

D7612: py3: send bytes from Rust-created warning patterns

2019-12-12 Thread Raphaël Gomès
Alphare created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Python code expects bytes in both Python 2 and Python 3, so we should send bytes. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL

D7611: py3: pass bytes to `configint` and `configbool`

2019-12-12 Thread Raphaël Gomès
Alphare created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Both functions require bytes, even in Python 3. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D7611 AFFECTED FILES

D7610: rust-threads: force Rayon to respect the worker count in config

2019-12-12 Thread Raphaël Gomès
Alphare created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY As per the inline comment, this is a workaround because Rust code does not yet know how to read config files. REPOSITORY rHG Mercurial BRANCH stable REVISIO

[PATCH 1 of 5 STABLE] rust-threads: force Rayon to respect the worker count in config

2019-12-12 Thread Raphaël Gomès
# HG changeset patch # User Raphaël Gomès # Date 1573399814 28800 # Sun Nov 10 07:30:14 2019 -0800 # Branch stable # Node ID 36425b06e091f8e6336358dba278ef3804e183fb # Parent 612b4b63fb2267320f18655c0fa8a675f8fe3939 rust-threads: force Rayon to respect the worker count in config As per the

[PATCH 5 of 5 STABLE] rust-cpython: do not convert warning pattern to utf-8 bytes

2019-12-12 Thread Raphaël Gomès
# HG changeset patch # User Yuya Nishihara # Date 1574173197 -32400 # Tue Nov 19 23:19:57 2019 +0900 # Branch stable # Node ID e0da98d4b03fbe274fe4c736ace28bc588c41ddf # Parent c549f8598cdf726b2e4239db5728ceebec448c23 rust-cpython: do not convert warning pattern to utf-8 bytes On Unix, both

[PATCH 4 of 5 STABLE] rust-cpython: import utils::files::* function at module level

2019-12-12 Thread Raphaël Gomès
# HG changeset patch # User Yuya Nishihara # Date 1574172976 -32400 # Tue Nov 19 23:16:16 2019 +0900 # Branch stable # Node ID c549f8598cdf726b2e4239db5728ceebec448c23 # Parent 2f084275a6435092058eaf9cb1a46cc6d7b0821a rust-cpython: import utils::files::* function at module level IIRC, it's

[PATCH 3 of 5 STABLE] py3: send bytes from Rust-created warning patterns

2019-12-12 Thread Raphaël Gomès
# HG changeset patch # User Raphaël Gomès # Date 1574095079 -3600 # Mon Nov 18 17:37:59 2019 +0100 # Branch stable # Node ID 2f084275a6435092058eaf9cb1a46cc6d7b0821a # Parent 697e5119ce5d2ae8c7ef048a8a18e2b15c7af17a py3: send bytes from Rust-created warning patterns Python code expects

[PATCH 2 of 5 STABLE] py3: pass bytes to `configint` and `configbool`

2019-12-12 Thread Raphaël Gomès
# HG changeset patch # User Raphaël Gomès # Date 1574094884 -3600 # Mon Nov 18 17:34:44 2019 +0100 # Branch stable # Node ID 697e5119ce5d2ae8c7ef048a8a18e2b15c7af17a # Parent 36425b06e091f8e6336358dba278ef3804e183fb py3: pass bytes to `configint` and `configbool` Both functions require

D7530: rust-dirstate-status: update bridge for new rust version of `dirstate.status`

2019-12-12 Thread Raphaël Gomès
Alphare updated this revision to Diff 18636. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7530?vs=18567&id=18636 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7530/new/ REVISION DETAIL https://phab.mercurial-scm.org/D75

D7531: rust-matchers: add support for `exactmatcher` in `dirstate.status`

2019-12-12 Thread Raphaël Gomès
Alphare edited the summary of this revision. Alphare retitled this revision from "rust-matchers: add support for `explicitmatcher` in `dirstate.status`" to "rust-matchers: add support for `exactmatcher` in `dirstate.status`". Alphare updated this revision to Diff 18637. REPOSITORY rHG Mercuria

D7529: rust-dirstate-status: add `walk_explicit` implementation, use `Matcher` trait

2019-12-12 Thread Raphaël Gomès
Alphare updated this revision to Diff 18635. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7529?vs=18423&id=18635 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7529/new/ REVISION DETAIL https://phab.mercurial-scm.org/D75

D7528: rust-matchers: add `FileMatcher` implementation

2019-12-12 Thread Raphaël Gomès
Alphare edited the summary of this revision. Alphare updated this revision to Diff 18634. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7528?vs=18418&id=18634 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7528/new/ REVISIO

D7609: rust-dirs: handle forgotten `Result`s

2019-12-12 Thread Raphaël Gomès
Alphare added a comment. Alphare added a subscriber: martinvonz. @martinvonz This should be ok. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7609/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7609 To: Alphare, #hg-reviewers Cc: martinvonz,

D7609: rust-dirs: handle forgotten `Result`s

2019-12-12 Thread Raphaël Gomès
Alphare updated this revision to Diff 18633. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7609?vs=18632&id=18633 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7609/new/ REVISION DETAIL https://phab.mercurial-scm.org/D76

D7522: rust-dirs: handle forgotten `Result`s

2019-12-12 Thread Raphaël Gomès
Alphare added a comment. Alphare abandoned this revision. Abandoned in favor of D7609 REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7522/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7522 To: Alphare, #

D7609: rust-dirs: handle forgotten `Result`s

2019-12-12 Thread Raphaël Gomès
Alphare created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY In 1fe2e574616e I introduced a temporary bugfix to align Rust code w

D7522: rust-dirs: handle forgotten `Result`s

2019-12-12 Thread Raphaël Gomès
(Wed Dec 11 10:51:38 2019 -0800) | x 2c62ed1a015a (46378) rust-dirs: handle forgotten `Result`s rewritten(description) as 5a1ff3d75f35 using phabsend by Raphaël Gomès (Wed Nov 27 14:30:10 2019 +0100) I don't have `80c3e3d4ddea` in my local repository. I could j

D7576: hg-core: add configparser to library

2019-12-12 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > Cargo.toml:14 > byteorder = "1.3.1" > +bytes = "0.4.10" > dirs = "2.0.2" I wonder about this dependency. It uses 4 `usize` for every slice of bytes, and adds some overhead, albeit minimal, that I am trying to justify. Are we looking at reaping

D7528: rust-matchers: add `FileMatcher` implementation

2019-12-11 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > martinvonz wrote in matchers.rs:136 > It would be slightly simpler if the paths were owned. It doesn't seem too > expensive to take ownership of the paths. Do we have any call sites in this > series that we can look at? There is a single call si

D7526: rust-hg-path: add method to get part of a path relative to a prefix

2019-12-11 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > martinvonz wrote in hg_path.rs:438 > The argument order here feels backwards. I know some frameworks (like Java's > JUnit) put the expected value first, but the definition of `assert_eq!` > doesn't seem to have any opinion and > https://doc.rust

D7531: rust-matchers: add support for `explicitmatcher` in `dirstate.status`

2019-12-11 Thread Raphaël Gomès
Alphare added a comment. Yes, I meant `exactmatcher` indeed. `FileMatcher` is meant for the Rust side of things, I do not intend to rename it in Python because it is a minor change that would make a lot of noise for bikeshedding. Do you think that would be a good idea? REPOSITORY rHG Me

D7118: rust-dirstatemap: remove additional lookups in traverse

2019-12-11 Thread Raphaël Gomès
Alphare added a comment. In D7118#111735 , @martinvonz wrote: > What's the state of this patch? The description makes it sound like it's a Rust patch, but it only modifies Python code. It only impacts the rust module policy, I figured the

D7579: tests: add test for Rust formatting

2019-12-10 Thread Raphaël Gomès
Alphare added a comment. In D7579#111704 , @durin42 wrote: > What are we depending on in the rustfmt settings that's nightly behavior? wrap_comments = true error_on_line_overflow = true Both depend on nightly. I can live wi

D7527: rust-matchers: add doctests for `AlwaysMatcher`

2019-12-10 Thread Raphaël Gomès
Closed by commit rHG542c8b277261: rust-matchers: add doctests for `AlwaysMatcher` (authored by Alphare). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7527?vs=18403&id=18585 CHANGE

D7526: rust-hg-path: add method to get part of a path relative to a prefix

2019-12-10 Thread Raphaël Gomès
Closed by commit rHG4f1543a2f5c3: rust-hg-path: add method to get part of a path relative to a prefix (authored by Alphare). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7526?vs=18

D7525: rust-matchers: improve `Matcher` trait ergonomics

2019-12-10 Thread Raphaël Gomès
Closed by commit rHG1bb4e9b02984: rust-matchers: improve `Matcher` trait ergonomics (authored by Alphare). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7525?vs=18401&id=18583 CHAN

D7524: rust-dirs-multiset: use `AsRef` instead of concrete types when possible

2019-12-10 Thread Raphaël Gomès
Closed by commit rHG088ba9d94079: rust-dirs-multiset: use `AsRef` instead of concrete types when possible (authored by Alphare). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7524?v

D7116: rust-performance: introduce FastHashMap type alias for HashMap

2019-12-10 Thread Raphaël Gomès
Closed by commit rHG5ac243a92e37: rust-performance: introduce FastHashMap type alias for HashMap (authored by Alphare). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mer

D7523: rust-hg-path: implement `Display` for `HgPath` and `HgPathBuf`

2019-12-10 Thread Raphaël Gomès
Closed by commit rHGc27e688fcdc3: rust-hg-path: implement `Display` for `HgPath` and `HgPathBuf` (authored by Alphare). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7523?vs=18421&i

D7530: rust-dirstate-status: update bridge for new rust version of `dirstate.status`

2019-12-10 Thread Raphaël Gomès
Alphare updated this revision to Diff 18567. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7530?vs=18406&id=18567 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7530/new/ REVISION DETAIL https://phab.mercurial-scm.org/D75

D7116: rust-performance: introduce FastHashMap type alias for HashMap

2019-12-10 Thread Raphaël Gomès
Alphare updated this revision to Diff 18563. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7116?vs=18039&id=18563 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7116/new/ REVISION DETAIL https://phab.mercurial-scm.org/D71

D7524: rust-dirs-multiset: use `AsRef` instead of concrete types when possible

2019-12-10 Thread Raphaël Gomès
Alphare updated this revision to Diff 18566. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7524?vs=18400&id=18566 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7524/new/ REVISION DETAIL https://phab.mercurial-scm.org/D75

D7119: rust-dirstatemap: remove additional lookup in dirstate.matches

2019-12-10 Thread Raphaël Gomès
Alphare updated this revision to Diff 18565. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7119?vs=18041&id=18565 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7119/new/ REVISION DETAIL https://phab.mercurial-scm.org/D71

D7118: rust-dirstatemap: remove additional lookups in traverse

2019-12-10 Thread Raphaël Gomès
Alphare updated this revision to Diff 18564. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7118?vs=18040&id=18564 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7118/new/ REVISION DETAIL https://phab.mercurial-scm.org/D71

D7579: tests: add test for Rust formatting

2019-12-09 Thread Raphaël Gomès
Alphare added a comment. While I am not a huge fan of the use of a nightly toolchain, I like the fact that we get the latest features and behavior as `rustfmt` is still pre-1.0 and subject to change. So far, it has been nice to us and has not broken anything I can recall, I vote for keeping

D7575: hg-core: vendor Facebook's configparser crate

2019-12-09 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > Alphare wrote in hg.rs:226 > This function looks very Facebook specific, I don't think we want to include > it at all. My bad, it looks like you took care of it in a future patch. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://p

D7576: hg-core: add configparser to library

2019-12-09 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > Cargo.toml:19 > memchr = "2.2.0" > +parking_lot = "0.9" > +pest = "2.1.0" "The current minimum required Rust version is 1.36". This disqualifies this crate from being used in `hg-core` right now. Good news is that it is supposed to offer improv

D7575: hg-core: vendor Facebook's configparser crate

2019-12-09 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > c_api.rs:1 > +/* > + * Copyright (c) Facebook, Inc. and its affiliates. Do we need bindings to C ? I don't see what the use-case is at this stage of the Rust development. > quark wrote in hg.rs:262-263 > You might want to respect `$PAGER`. We ig

D7574: hg-core: add utils::path to project

2019-12-09 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > Cargo.toml:12 > [dependencies] > +anyhow = "1.0.20" > byteorder = "1.3.1" Should we adopt this crate for error handling? I feel like our current solution - although it might need a refactor - is good at forcing the programmer to provide contex

D7573: hg-core: vendor Facebook's path utils module

2019-12-09 Thread Raphaël Gomès
Alphare added inline comments. Alphare accepted this revision. INLINE COMMENTS > path.rs:169 > +// > +// XXX: Doing this preprocessing has the unfortunate side-effect that > +// if an environment variable fails to expand on Windows, the resulting Would it take a lot of effort to rect

D7529: rust-dirstate-status: add `walk_explicit` implementation, use `Matcher` trait

2019-12-02 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > kevincox wrote in status.rs:125 > It seems to me that you can just use one lifetime here since the two input > limit the output. > > https://rust.godbolt.org/z/57bf6T But maybe I over-simplified the problem. You're right, the complex annotations

D7526: rust-hg-path: add method to get part of a path relative to a prefix

2019-12-02 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > kevincox wrote in hg_path.rs:131 > The comment says that `base` must end with a `/` however you appear to handle > cases where it doesn't Can you either update the documentation or the code? I've clarified the documentation. REPOSITORY rHG Mer

D7529: rust-dirstate-status: add `walk_explicit` implementation, use `Matcher` trait

2019-12-02 Thread Raphaël Gomès
Alphare updated this revision to Diff 18423. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7529?vs=18405&id=18423 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7529/new/ REVISION DETAIL https://phab.mercurial-scm.org/D75

D7526: rust-hg-path: add method to get part of a path relative to a prefix

2019-12-02 Thread Raphaël Gomès
Alphare marked 4 inline comments as done. Alphare updated this revision to Diff 18422. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7526?vs=18402&id=18422 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7526/new/ REVISION D

D7525: rust-matchers: improve `Matcher` trait ergonomics

2019-12-02 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > kevincox wrote in matchers.rs:87 > Another option here would just to have a global empty hash set. I feel like an `Option` is more explicit and less contrived, but yes. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercuria

D7523: rust-hg-path: implement `Display` for `HgPath` and `HgPathBuf`

2019-12-02 Thread Raphaël Gomès
Alphare marked an inline comment as done. Alphare updated this revision to Diff 18421. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7523?vs=18399&id=18421 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7523/new/ REVISION D

D7528: rust-matchers: add `FileMatcher` implementation

2019-12-02 Thread Raphaël Gomès
Alphare updated this revision to Diff 18418. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7528?vs=18404&id=18418 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7528/new/ REVISION DETAIL https://phab.mercurial-scm.org/D75

D7530: rust-dirstate-status: update bridge for new rust version of `dirstate.status`

2019-11-29 Thread Raphaël Gomès
Alphare created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D7530 AFFECTED FILES rust/hg-core/src/lib.rs rust/hg-cpython/src/d

D7531: rust-matchers: add support for `explicitmatcher` in `dirstate.status`

2019-11-29 Thread Raphaël Gomès
Alphare created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D7531 AFFECTED FILES mercurial/dirstate.py CHANGE DETAILS diff --git a/mercurial/dir

D7529: rust-dirstate-status: add `walk_explicit` implementation, use `Matcher` trait

2019-11-29 Thread Raphaël Gomès
Alphare created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This is the first time we actually use the `Matcher` trait, still for a small subset of all matchers defined in Python. While I haven't yet

D7528: rust-matchers: add `FileMatcher` implementation

2019-11-29 Thread Raphaël Gomès
Alphare created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Mercurial defines an `exactmatcher`, I find `FileMatcher` to be clearer, but am not opposed to using the old name. REPOSITORY rHG Mercurial B

D7527: rust-matchers: add doctests for `AlwaysMatcher`

2019-11-29 Thread Raphaël Gomès
Alphare created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D7527 AFFECTED FILES rust/hg-core/src/matchers.rs CHANGE DETAILS d

D7526: rust-hg-path: add method to get part of a path relative to a prefix

2019-11-29 Thread Raphaël Gomès
Alphare created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This will be used in the next patch in this series. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org

D7525: rust-matchers: improve `Matcher` trait ergonomics

2019-11-29 Thread Raphaël Gomès
Alphare created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY `VisitChildrenSet` has no need to own the set, this will save allocations. The `file_set` return type change is motivated by both ergonomics a

D7524: rust-dirs-multiset: use `AsRef` instead of concrete types when possible

2019-11-29 Thread Raphaël Gomès
Alphare created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY I also renamed `vec` to `dirstate`, because it was not a great name. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.

D7523: rust-hg-path: implement `Display` for `HgPath` and `HgPathBuf`

2019-11-29 Thread Raphaël Gomès
Alphare created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This is useful when debugging, to get a human readable output instead of an array of `u8`. REPOSITORY rHG Mercurial BRANCH default REVISIO

D7503: rust-dirs: address failing tests for `dirs` impl with a temporary fix

2019-11-27 Thread Raphaël Gomès
Alphare added a comment. > Okay, then using non-debug `assert!()` seems more appropriate. If we prefer > being stricter, "checked" HgPath type can be introduced. > ... > Actually I tried to suppress these warnings by propagating Result upwards, > and I got a feeling that we're doing wro

D7522: rust-dirs: handle forgotten `Result`s

2019-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY In 20a3bf5e71d6 I introduced a temporary bugfix to align Rust code w

D7503: rust-dirs: address failing tests for `dirs` impl with a temporary fix

2019-11-27 Thread Raphaël Gomès
Alphare added a comment. > I generally prefer adding safety checks at ABI boundary. If malicious input > makes Rust code crash or exhaust CPU/memory resource, I would add sanity > check to rust-cpython layer. Sure, that makes sense in our configuration, but we need to consider `hg-cor

D7503: rust-dirs: address failing tests for `dirs` impl with a temporary fix

2019-11-25 Thread Raphaël Gomès
Alphare added a comment. In D7503#110345 , @yuja wrote: > Many unhandled results: Ah sorry, the cargo compilation cache hid those warnings from me, I usually catch them. > Might be better to do `path.check_state()` in cpython layer, a

D7503: rust-dirs: address failing tests for `dirs` impl with a temporary fix

2019-11-22 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > marmoute wrote in lib.rs:117 > Should we also have the path included in that error ? This patch is a minimal effort to stick to the C and Python implementations until a decision is reached. Should we decide to keep this code, I would be for havi

D7503: rust-dirs: address failing tests for `dirs` impl with a temporary fix

2019-11-22 Thread Raphaël Gomès
Closed by commit rHG20a3bf5e71d6: rust-dirs: address failing tests for `dirs` impl with a temporary fix (authored by Alphare). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY

D7503: rust-dirs: address failing tests for `dirs` impl with a temporary fix

2019-11-22 Thread Raphaël Gomès
Alphare created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY https://phab.mercurial-scm.org/D7252 (5d40317d42b7083b49467502549e25f144888cb3

Re: [PATCH 1 of 2] rust-cpython: import utils::files::* function at module level

2019-11-19 Thread Raphaël Gomès
Nit: I prefer to nest the imports. I don't have any issue with the intent of this patch, namespacing might be clearer. On 11/19/19 4:20 PM, Yuya Nishihara wrote: # HG changeset patch # User Yuya Nishihara # Date 1574172976 -32400 # Tue Nov 19 23:16:16 2019 +0900 # Node ID 3a542e3823dda716

D7252: dirs: reject consecutive slashes in paths

2019-11-19 Thread Raphaël Gomès
Alphare added a comment. > Oh, you mean the Rust version doesn't do the same rejection? It does not, currently. > Given that you're about to do a hash lookup, I'm a little skeptical that a `endswith('/')` check would show up meaningfully in a profiler, but I'm willing to be proven w

D7252: dirs: reject consecutive slashes in paths

2019-11-19 Thread Raphaël Gomès
Alphare added a comment. Sorry to necropost, but since this broke the Rust implementation, I was wondering what the best approach would be to replicate this behavior, and I am starting to think that this should be reverted. IIUC, currently any new path passes through the `pathauditor` fi

D7454: py3: send bytes from Rust-created warning patterns

2019-11-18 Thread Raphaël Gomès
Closed by commit rHGdc4e74d0ef96: py3: send bytes from Rust-created warning patterns (authored by Alphare). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7454?vs=18210&id=18220 CHA

D7453: py3: pass bytes to `configint` and `configbool`

2019-11-18 Thread Raphaël Gomès
Closed by commit rHG794426e96970: py3: pass bytes to `configint` and `configbool` (authored by Alphare). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7453?vs=18209&id=18219 CHANGE

D7453: py3: pass bytes to `configint` and `configbool`

2019-11-18 Thread Raphaël Gomès
Alphare created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Both functions require bytes, even in Python 3. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D7453 AFFECTED FILES

D7454: py3: send bytes from Rust-created warning patterns

2019-11-18 Thread Raphaël Gomès
Alphare created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Python code expects bytes in both Python 2 and Python 3, so we should send bytes. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D7439: dirstate: include explicit matches in match.traversedir calls

2019-11-18 Thread Raphaël Gomès
Alphare added inline comments. Alphare accepted this revision. INLINE COMMENTS > martinvonz wrote in dirstate.py:942 > It's on line 916 in this file. Indeed. Don't know what happened. Thanks REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7439/new/ REVIS

D7439: dirstate: include explicit matches in match.traversedir calls

2019-11-18 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > dirstate.py:942 > results, work, dirsnotfound = self._walkexplicit(match, subrepos) > +if matchtdir: > +for d in work: Where is `matchtdir` defined? I don't see it on any of the patches in the stack. REPOSITORY rHG

D7406: scmutil: convert status data object from a tuple to an attrs (API)

2019-11-15 Thread Raphaël Gomès
Alphare added a comment. It appears PyCharm is confused by this change, which is weird, because it's supposed to support `attrs`. I would have to file a bug. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7406/new/ REVISION DETAIL https://phab.mercu

Re: D7423: rust: vendor pyembed crate

2019-11-15 Thread Raphaël Gomès
Georges (gracinet) has write access to rust-cpython now, so we could probably help out in getting those changes upstreamed. Where can I find those aforementioned changes? On 11/15/19 6:03 AM, indygreg (Gregory Szorc) wrote: indygreg added a comment. indygreg planned changes to this revision.

D7116: rust-performance: introduce FastHashMap type alias for HashMap

2019-11-12 Thread Raphaël Gomès
Alphare updated this revision to Diff 18039. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7116?vs=17198&id=18039 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7116/new/ REVISION DETAIL https://phab.mercurial-scm.org/D71

D7119: rust-dirstatemap: remove additional lookup in dirstate.matches

2019-11-12 Thread Raphaël Gomès
Alphare updated this revision to Diff 18041. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7119?vs=17201&id=18041 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7119/new/ REVISION DETAIL https://phab.mercurial-scm.org/D71

D7118: rust-dirstatemap: remove additional lookups in traverse

2019-11-12 Thread Raphaël Gomès
Alphare updated this revision to Diff 18040. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7118?vs=17200&id=18040 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7118/new/ REVISION DETAIL https://phab.mercurial-scm.org/D71

D7255: rust-matchers: remove default implementations for `Matcher` trait

2019-11-11 Thread Raphaël Gomès
Closed by commit rHG27c25c0dc967: rust-matchers: remove default implementations for `Matcher` trait (authored by Alphare). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG

D7301: rust: introduce SIZE_FROM_OTHER_PARENT constant

2019-11-11 Thread Raphaël Gomès
Closed by commit rHG8210c3f46912: rust: introduce SIZE_FROM_OTHER_PARENT constant (authored by Alphare). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial CHANGES

D7300: rust-status: refactor dispatch case for normal files

2019-11-11 Thread Raphaël Gomès
Closed by commit rHG51cd86735608: rust-status: refactor dispatch case for normal files (authored by Alphare). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial CH

D7299: rust-status: return a ParallelIterator instead of a Vec from stat_dmap_entries

2019-11-11 Thread Raphaël Gomès
Closed by commit rHG75fe6e71ddb8: rust-status: return a ParallelIterator instead of a Vec from stat_dmap_entries (authored by Alphare). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPO

D7254: rust-status: improve status performance

2019-11-11 Thread Raphaël Gomès
Closed by commit rHG889ac87e8bfd: rust-status: improve status performance (authored by Alphare). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial CHANGES SINCE L

<    4   5   6   7   8   9   10   11   12   13   >