D7923: rust-matchers: add functions to get roots, dirs and parents from patterns

2020-02-06 Thread Raphaël Gomès
Alphare updated this revision to Diff 19939. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7923?vs=19418&id=19939 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7923/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D7924: rust-matchers: add `build_regex_match` function

2020-02-06 Thread Raphaël Gomès
Alphare updated this revision to Diff 19940. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7924?vs=19419&id=19940 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7924/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D7925: rust-matchers: add `IgnoreMatcher`

2020-02-06 Thread Raphaël Gomès
Alphare updated this revision to Diff 19941. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7925?vs=19420&id=19941 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7925/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D7927: rust-status: add util for listing a directory

2020-02-06 Thread Raphaël Gomès
Alphare updated this revision to Diff 19942. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7927?vs=19416&id=19942 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7927/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D8088: rust-status: add missing variants to `Dispatch` enum

2020-02-06 Thread Raphaël Gomès
Alphare created this revision. Herald added subscribers: mercurial-devel, kevincox. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D8088 AFFECTED FILES rust/hg-core/src/dirstate/status.rs CHANGE DETAILS dif

D8086: rust-status: refactor options into a `StatusOptions` struct

2020-02-06 Thread Raphaël Gomès
Alphare created this revision. Herald added subscribers: mercurial-devel, kevincox. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D8086 AFFECTED FILES rust/hg-core/src/dirstate/status.rs rust/hg-core/src/l

D8087: rust-status: rename `StatusResult` to `DirstateStatus`

2020-02-06 Thread Raphaël Gomès
Alphare created this revision. Herald added subscribers: mercurial-devel, kevincox. Herald added a reviewer: hg-reviewers. REVISION SUMMARY "Result" has a special meaning in the Rust world, this should be clearer. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.merc

D7928: rust-status: add function for sequential traversal of the working directory

2020-02-06 Thread Raphaël Gomès
Alphare updated this revision to Diff 19946. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7928?vs=19417&id=19946 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7928/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D7929: rust-status: add bare `hg status` support in hg-core

2020-02-06 Thread Raphaël Gomès
Alphare updated this revision to Diff 19947. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7929?vs=19421&id=19947 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7929/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D7910: rust-re2: add wrapper for calling Re2 from Rust

2020-02-06 Thread Raphaël Gomès
be needed to use `regex`. +mod re2; +pub use re2::Re2; diff --git a/rust/hg-core/src/lib.rs b/rust/hg-core/src/lib.rs --- a/rust/hg-core/src/lib.rs +++ b/rust/hg-core/src/lib.rs @@ -21,6 +21,8 @@ pub mod matchers; pub mod revlog; pub use revlog::*; +#[cfg(feature = "with-re2")] +pub m

D7930: rust-status: update rust-cpython bridge to account for the changes in core

2020-02-06 Thread Raphaël Gomès
Alphare updated this revision to Diff 19948. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7930?vs=19422&id=19948 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7930/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D7931: rust-status: use bare hg status fastpath from Python

2020-02-06 Thread Raphaël Gomès
Alphare updated this revision to Diff 19949. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7931?vs=19423&id=19949 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7931/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D7866: rust-pathauditor: add Rust implementation of the `pathauditor`

2020-02-06 Thread Raphaël Gomès
rust/hg-core/src/utils/path_auditor.rs CHANGE DETAILS diff --git a/rust/hg-core/src/utils/path_auditor.rs b/rust/hg-core/src/utils/path_auditor.rs new file mode 100644 --- /dev/null +++ b/rust/hg-core/src/utils/path_auditor.rs @@ -0,0 +1,230 @@ +// path_auditor.rs +// +// Copyright 2020 +// Rap

D7870: rust-utils: add `Escaped` trait

2020-02-06 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > martinvonz wrote in utils.rs:154-157 > i.e. `self.iter().flat_map(|item| item.escaped_bytes()).collect()`? Sometimes I forget about `flat_map`. Thanks! REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7870/n

D7866: rust-pathauditor: add Rust implementation of the `pathauditor`

2020-02-06 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > martinvonz wrote in path_auditor.rs:191 > This test now fails. I'll fix it. Right, sorry! REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7866/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7866 T

D7867: rust-hg-path: add useful methods to `HgPath`

2020-02-06 Thread Raphaël Gomès
Closed by commit rHGe1ba9c5d5e78: rust-hg-path: add useful methods to `HgPath` (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 SI

D7870: rust-utils: add `Escaped` trait

2020-02-06 Thread Raphaël Gomès
Alphare updated this revision to Diff 19958. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7870?vs=19348&id=19958 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7870/new/ REVISION DETAIL https://phab.mercurial-scm.org/D78

D7869: rust-dirs-multiset: add `DirsChildrenMultiset`

2020-02-06 Thread Raphaël Gomès
Closed by commit rHG2dca0d76358c: rust-dirs-multiset: add `DirsChildrenMultiset` (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

D7982: rust-utils: introduce `subslice_index` function

2020-02-06 Thread Raphaël Gomès
Alphare updated this revision to Diff 19959. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7982?vs=19547&id=19959 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7982/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D7982: rust-utils: introduce `subslice_index` function

2020-02-06 Thread Raphaël Gomès
Alphare added a comment. Alphare abandoned this revision. I was certain to have pruned this one. I'll do it. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7982/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7982 To: Alphare, #hg-reviewers, ma

D7870: rust-utils: add `Escaped` trait

2020-02-06 Thread Raphaël Gomès
Closed by commit rHGaa0fc32ece9e: rust-utils: add `Escaped` 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 Mercurial CHANGES SINCE LAST UPDA

D7871: rust-utils: add util for canonical path

2020-02-06 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > martinvonz wrote in files.rs:207-216 > Might be worth having a fast path for when `name` is not absolute (including > "") and neither `name` nor `cwd` contains "../"so we don't do `let name = > root.join(&cwd).join(&name)` immediately followed by

D7921: rust-dirs-multiset: improve temporary error message

2020-02-07 Thread Raphaël Gomès
Closed by commit rHGa5c7d6cdaa2e: rust-dirs-multiset: improve temporary error message (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 CHA

D7923: rust-matchers: add functions to get roots, dirs and parents from patterns

2020-02-10 Thread Raphaël Gomès
Alphare added a comment. @kevincox I am currently fighting a nasty rebase and will be re-sending a lot of these patches (in less than 30 minutes hopefully). Just so you don't have to re-check another time. :) REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-s

D7871: rust-utils: add util for canonical path

2020-02-10 Thread Raphaël Gomès
Alphare updated this revision to Diff 20037. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7871?vs=19937&id=20037 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7871/new/ REVISION DETAIL https://phab.mercurial-scm.org/D78

D7908: rust-filepatterns: improve API and robustness for pattern files parsing

2020-02-10 Thread Raphaël Gomès
Alphare updated this revision to Diff 20038. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7908?vs=19384&id=20038 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7908/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D7909: rust-filepatterns: add support for `include` and `subinclude` patterns

2020-02-10 Thread Raphaël Gomès
Alphare updated this revision to Diff 20039. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7909?vs=19385&id=20039 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7909/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D7910: rust-re2: add wrapper for calling Re2 from Rust

2020-02-10 Thread Raphaël Gomès
be needed to use `regex`. +mod re2; +pub use re2::Re2; diff --git a/rust/hg-core/src/lib.rs b/rust/hg-core/src/lib.rs --- a/rust/hg-core/src/lib.rs +++ b/rust/hg-core/src/lib.rs @@ -21,6 +21,8 @@ pub mod matchers; pub mod revlog; pub use revlog::*; +#[cfg(feature = "with-re2")] +pub m

D7931: rust-status: use bare hg status fastpath from Python

2020-02-10 Thread Raphaël Gomès
Alphare updated this revision to Diff 20041. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7931?vs=19949&id=20041 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7931/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D8050: rust-dirstatemap: update call sites from Python

2020-02-10 Thread Raphaël Gomès
Alphare added a comment. In D8050#119795 , @marmoute wrote: > This is straightforward, however having some performance number would be great. This is simply an API change related to the performance improvements in previous patches. Is th

D7914: rust-matchers: implement `visit_children_set` for `FileMatcher`

2020-02-10 Thread Raphaël Gomès
Alphare added a comment. @martinvonz Any update on this patch? Note: I will get to your remarks on the first change of the stack very soon as well. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7914/new/ REVISION DETAIL https://phab.mercurial-sc

D7927: rust-status: add util for listing a directory

2020-02-10 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > marmoute wrote in status.rs:74 > If I understand you code correctly you currently do: > > filenames = listdir() > result = [(f, entry(f)) for f in filenames] > result.sort() > > Would it make sense to do: > > filenames = listdir() > fi

D8086: rust-status: refactor options into a `StatusOptions` struct

2020-02-10 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > kevincox wrote in status.rs:208 > These names aren't very meaningful to me but maybe that is because I'm not > super familiar with the domain. It doesn't hurt to have some documentation. They're not super obvious indeed. REPOSITORY rHG Mercuri

D7929: rust-status: add bare `hg status` support in hg-core

2020-02-10 Thread Raphaël Gomès
Alphare added inline comments. Alphare marked an inline comment as done. INLINE COMMENTS > marmoute wrote in status.rs:241 > It is still not very clear to me. Do we have BadType case where it would make > sense to use somethign else than Unknown? We could check for block devices, character devi

D7924: rust-matchers: add `build_regex_match` function

2020-02-10 Thread Raphaël Gomès
Alphare updated this revision to Diff 20042. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7924?vs=19940&id=20042 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7924/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D7925: rust-matchers: add `IgnoreMatcher`

2020-02-10 Thread Raphaël Gomès
Alphare updated this revision to Diff 20043. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7925?vs=19941&id=20043 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7925/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D8088: rust-status: add missing variants to `Dispatch` enum

2020-02-10 Thread Raphaël Gomès
Alphare updated this revision to Diff 20046. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8088?vs=19945&id=20046 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8088/new/ REVISION DETAIL https://phab.mercurial-scm.org/D80

D8086: rust-status: refactor options into a `StatusOptions` struct

2020-02-10 Thread Raphaël Gomès
Alphare updated this revision to Diff 20044. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8086?vs=19943&id=20044 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8086/new/ REVISION DETAIL https://phab.mercurial-scm.org/D80

D7928: rust-status: add function for sequential traversal of the working directory

2020-02-10 Thread Raphaël Gomès
Alphare updated this revision to Diff 20047. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7928?vs=19946&id=20047 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7928/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D8087: rust-status: rename `StatusResult` to `DirstateStatus`

2020-02-10 Thread Raphaël Gomès
Alphare updated this revision to Diff 20045. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8087?vs=19944&id=20045 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8087/new/ REVISION DETAIL https://phab.mercurial-scm.org/D80

D7929: rust-status: add bare `hg status` support in hg-core

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

D7930: rust-status: update rust-cpython bridge to account for the changes in core

2020-02-10 Thread Raphaël Gomès
Alphare updated this revision to Diff 20049. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7930?vs=19948&id=20049 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7930/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D7871: rust-utils: add util for canonical path

2020-02-10 Thread Raphaël Gomès
Alphare updated this revision to Diff 20051. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7871?vs=20037&id=20051 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7871/new/ REVISION DETAIL https://phab.mercurial-scm.org/D78

D7871: rust-utils: add util for canonical path

2020-02-10 Thread Raphaël Gomès
Alphare updated this revision to Diff 20057. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7871?vs=20051&id=20057 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7871/new/ REVISION DETAIL https://phab.mercurial-scm.org/D78

D8049: rust-dirstatemap: add `NonNormalEntries` class

2020-02-10 Thread Raphaël Gomès
tate/non_normal_entries.rs b/rust/hg-cpython/src/dirstate/non_normal_entries.rs new file mode 100644 --- /dev/null +++ b/rust/hg-cpython/src/dirstate/non_normal_entries.rs @@ -0,0 +1,52 @@ +// non_normal_other_parent_entries.rs +// +// Copyright 2020 Raphaël Gomès +// +// This software may be used and distrib

D8050: rust-dirstatemap: update call sites from Python

2020-02-10 Thread Raphaël Gomès
Alphare added a comment. Alphare abandoned this revision. Folded into the previous changeset, with an amended commit message REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8050/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8050 To: Alphare, #

D8048: rust-dirstatemap: cache non normal and other parent set

2020-02-10 Thread Raphaël Gomès
Closed by commit rHG83b2b829c94e: rust-dirstatemap: cache non normal and other parent set (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

D8048: rust-dirstatemap: cache non normal and other parent set

2020-02-10 Thread Raphaël Gomès
Alphare updated this revision to Diff 20060. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8048?vs=20059&id=20060 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8048/new/ REVISION DETAIL https://phab.mercurial-scm.org/D80

D8049: rust-dirstatemap: add `NonNormalEntries` class

2020-02-10 Thread Raphaël Gomès
tate/non_normal_entries.rs new file mode 100644 --- /dev/null +++ b/rust/hg-cpython/src/dirstate/non_normal_entries.rs @@ -0,0 +1,52 @@ +// non_normal_other_parent_entries.rs +// +// Copyright 2020 Raphaël Gomès +// +// This software may be used and distributed according to the terms of the +// GNU Gen

D8049: rust-dirstatemap: add `NonNormalEntries` class

2020-02-10 Thread Raphaël Gomès
n/src/dirstate/non_normal_entries.rs @@ -0,0 +1,52 @@ +// non_normal_other_parent_entries.rs +// +// Copyright 2020 Raphaël Gomès +// +// This software may be used and distributed according to the terms of the +// GNU General Public License version 2 or any later version. + +use cpython::{ +exc::NotImplementedEr

D7871: rust-utils: add util for canonical path

2020-02-10 Thread Raphaël Gomès
Closed by commit rHGecf816b17825: rust-utils: add util for canonical path (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/D7871?vs=20057&id=20077 CHANGES SINCE

D7908: rust-filepatterns: improve API and robustness for pattern files parsing

2020-02-10 Thread Raphaël Gomès
Closed by commit rHG725d79b48e07: rust-filepatterns: improve API and robustness for pattern files parsing (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

D7909: rust-filepatterns: add support for `include` and `subinclude` patterns

2020-02-10 Thread Raphaël Gomès
Closed by commit rHGd1fb8bdf3384: rust-filepatterns: add support for `include` and `subinclude` 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

D7910: rust-re2: add wrapper for calling Re2 from Rust

2020-02-10 Thread Raphaël Gomès
.rs b/rust/hg-core/src/lib.rs --- a/rust/hg-core/src/lib.rs +++ b/rust/hg-core/src/lib.rs @@ -21,6 +21,8 @@ pub mod matchers; pub mod revlog; pub use revlog::*; +#[cfg(feature = "with-re2")] +pub mod re2; pub mod utils; use crate::utils::hg_path::{HgPathBuf, HgPathError}; diff --git

D7871: rust-utils: add util for canonical path

2020-02-10 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > martinvonz wrote in files.rs:366 > Can the test method be annotated so it's only run on unix? Yes, but I think we need to have a more general chat about this subject. A non-negligible number of `hg-core`'s features do not work under non-UNIX sys

D7914: rust-matchers: implement `visit_children_set` for `FileMatcher`

2020-02-10 Thread Raphaël Gomès
Closed by commit rHG54d185eb24b5: rust-matchers: implement `visit_children_set` for `FileMatcher` (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

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

2020-02-11 Thread Raphaël Gomès
Alphare added a comment. In D7119#119792 , @marmoute wrote: > @Alphare so what should we do of this patch ? IMO it should still be valid, it's harmless at best. I don't remember having strong performance numbers. Now that most of the stat

D7922: rust-matchers: add function to generate a regex matcher function

2020-02-11 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > martinvonz wrote in matchers.rs:224 > Hmm, I don't like to replicate this into Rust. I argued for a long time with > Boris over a year ago that we should see if we can remove it from Python. He > said they (Octobus, I think) would look into that

D7922: rust-matchers: add function to generate a regex matcher function

2020-02-11 Thread Raphaël Gomès
Alphare updated this revision to Diff 20154. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7922?vs=19401&id=20154 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7922/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D8086: rust-status: refactor options into a `StatusOptions` struct

2020-02-11 Thread Raphaël Gomès
Alphare updated this revision to Diff 20155. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8086?vs=20044&id=20155 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8086/new/ REVISION DETAIL https://phab.mercurial-scm.org/D80

D8087: rust-status: rename `StatusResult` to `DirstateStatus`

2020-02-11 Thread Raphaël Gomès
Alphare updated this revision to Diff 20156. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8087?vs=20045&id=20156 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8087/new/ REVISION DETAIL https://phab.mercurial-scm.org/D80

D7929: rust-status: add bare `hg status` support in hg-core

2020-02-11 Thread Raphaël Gomès
Alphare updated this revision to Diff 20157. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7929?vs=20048&id=20157 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7929/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D7930: rust-status: update rust-cpython bridge to account for the changes in core

2020-02-11 Thread Raphaël Gomès
Alphare updated this revision to Diff 20158. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7930?vs=20049&id=20158 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7930/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D7931: rust-status: use bare hg status fastpath from Python

2020-02-11 Thread Raphaël Gomès
Alphare updated this revision to Diff 20159. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7931?vs=20041&id=20159 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7931/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D7922: rust-matchers: add function to generate a regex matcher function

2020-02-11 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > Alphare wrote in matchers.rs:224 > I am having a little trouble reading the patchwork thread, but I gather that > you want to get rid of the preventive splitting of patterns and just let the > regex engine handle it on its own? Was this measure t

D7923: rust-matchers: add functions to get roots, dirs and parents from patterns

2020-02-11 Thread Raphaël Gomès
Alphare updated this revision to Diff 20161. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7923?vs=19939&id=20161 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7923/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D7922: rust-matchers: add function to generate a regex matcher function

2020-02-11 Thread Raphaël Gomès
Alphare updated this revision to Diff 20160. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7922?vs=20154&id=20160 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7922/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D7924: rust-matchers: add `build_regex_match` function

2020-02-11 Thread Raphaël Gomès
Alphare updated this revision to Diff 20162. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7924?vs=20042&id=20162 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7924/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D7925: rust-matchers: add `IgnoreMatcher`

2020-02-11 Thread Raphaël Gomès
Alphare updated this revision to Diff 20163. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7925?vs=20043&id=20163 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7925/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D8086: rust-status: refactor options into a `StatusOptions` struct

2020-02-11 Thread Raphaël Gomès
Alphare updated this revision to Diff 20164. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8086?vs=20155&id=20164 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8086/new/ REVISION DETAIL https://phab.mercurial-scm.org/D80

D7931: rust-status: use bare hg status fastpath from Python

2020-02-11 Thread Raphaël Gomès
Alphare updated this revision to Diff 20167. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7931?vs=20159&id=20167 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7931/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D7927: rust-status: add util for listing a directory

2020-02-12 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > kevincox wrote in status.rs:76 > It would be more clear to do `.sort_by_key(|e| e.0)` > > And I don't think stability matters here so you could use > `sort_unstable_by_key`. I didn't realize that `sort_unstable_by_key` needed to return a `T` and

D7929: rust-status: add bare `hg status` support in hg-core

2020-02-12 Thread Raphaël Gomès
Alphare added inline comments. Alphare marked an inline comment as done. INLINE COMMENTS > kevincox wrote in status.rs:456 > Why was this changed when IIUC all of the returns are references? If a caller > wants that I would prefer to do a map in the caller. `traverse` returns some `Cow::Owned`,

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

2020-02-12 Thread Raphaël Gomès
Closed by commit rHGbed8d08cfcb2: rust-dirstatemap: remove additional lookup in dirstate.matches (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

D8110: rust-dirstatemap: cache non normal and other parent set

2020-02-13 Thread Raphaël Gomès
Alphare added a comment. In D8110#120671 , @marmoute wrote: > This is supposed to be a graft of something already accepted on default. So unless I did a mistake on the graft (cc @Alphare for checking) any feedback on this also apply on the de

D8110: rust-dirstatemap: cache non normal and other parent set

2020-02-13 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > kevincox wrote in dirstate_map.rs:38 > I don't understand why an `Option` is faster than a `HashSet`. Could > you add some explanation to the commit message? Is this to avoid attempting > to initialize the entry multiple times? Using `Option` ad

D8110: rust-dirstatemap: cache non normal and other parent set

2020-02-13 Thread Raphaël Gomès
Closed by commit rHG58c74a517a00: rust-dirstatemap: cache non normal and other parent set (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

D8111: rust-dirstatemap: add `NonNormalEntries` class

2020-02-13 Thread Raphaël Gomès
n/src/dirstate/non_normal_entries.rs @@ -0,0 +1,52 @@ +// non_normal_other_parent_entries.rs +// +// Copyright 2020 Raphaël Gomès +// +// This software may be used and distributed according to the terms of the +// GNU General Public License version 2 or any later version. + +use cpython::{ +exc::NotImplementedEr

D7927: rust-status: add util for listing a directory

2020-02-13 Thread Raphaël Gomès
Alphare updated this revision to Diff 20183. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7927?vs=19942&id=20183 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7927/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D8088: rust-status: add missing variants to `Dispatch` enum

2020-02-13 Thread Raphaël Gomès
Alphare updated this revision to Diff 20186. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8088?vs=20046&id=20186 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8088/new/ REVISION DETAIL https://phab.mercurial-scm.org/D80

D8086: rust-status: refactor options into a `StatusOptions` struct

2020-02-13 Thread Raphaël Gomès
Alphare updated this revision to Diff 20184. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8086?vs=20164&id=20184 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8086/new/ REVISION DETAIL https://phab.mercurial-scm.org/D80

D7928: rust-status: add function for sequential traversal of the working directory

2020-02-13 Thread Raphaël Gomès
Alphare updated this revision to Diff 20187. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7928?vs=20047&id=20187 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7928/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D8087: rust-status: rename `StatusResult` to `DirstateStatus`

2020-02-13 Thread Raphaël Gomès
Alphare updated this revision to Diff 20185. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8087?vs=20156&id=20185 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8087/new/ REVISION DETAIL https://phab.mercurial-scm.org/D80

D7929: rust-status: add bare `hg status` support in hg-core

2020-02-13 Thread Raphaël Gomès
Alphare marked 5 inline comments as done. Alphare updated this revision to Diff 20188. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7929?vs=20157&id=20188 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7929/new/ REVISION D

D7930: rust-status: update rust-cpython bridge to account for the changes in core

2020-02-13 Thread Raphaël Gomès
Alphare updated this revision to Diff 20189. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7930?vs=20158&id=20189 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7930/new/ REVISION DETAIL https://phab.mercurial-scm.org/D79

D8030: copy: add experimetal support for unmarking committed copies

2020-02-14 Thread Raphaël Gomès
Alphare added a comment. > I'm fine with marking the use of `-r` experimental. I don't like the idea of delaying this feature two months. Any problem with marking it experimental for now? As usual with experimental features, that will allow us to rename the flag (and change other behavior) b

D7929: rust-status: add bare `hg status` support in hg-core

2020-02-14 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > kevincox wrote in status.rs:456 > I can definitely see that this is a judgement call. However > `.map(Cow::Borrowed)` is easy enough to write that I think it makes sense in > this case. However both ways are acceptable. I think your way is clean

Re: Nlnet funding for transitioning out of SHA-1

2020-02-14 Thread Raphaël Gomès
Hello all, I've received an email from Nlnet acknowledging our submission. It should be reviewed within the next 3 weeks. I'll keep you updated. On 1/15/20 5:53 PM, Raphaël Gomès wrote: Hello all, As you all know, we have to transition out of using SHA-1 for Mercur

D7796: rust-nodemap: input/output primitives

2020-02-14 Thread Raphaël Gomès
Alphare added a comment. @kevincox To re-iterate, I've taken over this series, so excuse any additional inaccuracies. INLINE COMMENTS > gracinet wrote in nodemap.rs:268 > About a method to output to a writer: for the time being, we're avoiding > doing I/O directly in Rust because most of it

D7797: rust-nodemap: pure Rust example

2020-02-14 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > kevincox wrote in index.rs:47 > I would make this an early return and remove the else. It seems to me like an > unexpected condition. If it should never happen then please add a > debug_assert as well. This is expected to happen, as it is the cu

D7796: rust-nodemap: input/output primitives

2020-02-14 Thread Raphaël Gomès
Alphare updated this revision to Diff 20215. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7796?vs=20025&id=20215 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7796/new/ REVISION DETAIL https://phab.mercurial-scm.org/D77

D7798: rust-nodemap: special case for prefixes of NULL_NODE

2020-02-14 Thread Raphaël Gomès
Alphare updated this revision to Diff 20217. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7798?vs=20027&id=20217 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7798/new/ REVISION DETAIL https://phab.mercurial-scm.org/D77

D8097: rust-nodemap: accounting for dead blocks

2020-02-14 Thread Raphaël Gomès
Alphare updated this revision to Diff 20219. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8097?vs=20029&id=20219 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8097/new/ REVISION DETAIL https://phab.mercurial-scm.org/D80

D8098: rust-nodemap: a method for full invalidation

2020-02-14 Thread Raphaël Gomès
Alphare updated this revision to Diff 20220. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8098?vs=20030&id=20220 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8098/new/ REVISION DETAIL https://phab.mercurial-scm.org/D80

D7797: rust-nodemap: pure Rust example

2020-02-14 Thread Raphaël Gomès
Alphare updated this revision to Diff 20216. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7797?vs=20166&id=20216 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7797/new/ REVISION DETAIL https://phab.mercurial-scm.org/D77

D7819: rust-nodemap: core implementation for shortest

2020-02-14 Thread Raphaël Gomès
Alphare updated this revision to Diff 20218. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7819?vs=20028&id=20218 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7819/new/ REVISION DETAIL https://phab.mercurial-scm.org/D78

D8110: rust-dirstatemap: cache non normal and other parent set

2020-02-14 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > kevincox wrote in dirstate_map.rs:251 > You should be able to use `.as_mut()` just like you are currently doing in > the caller. `as_mut()` only does `&mut Option -> Option<&mut T>`, which isn't always what we want (however you can argue that it

D8110: rust-dirstatemap: cache non normal and other parent set

2020-02-14 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > kevincox wrote in dirstate_map.rs:251 > It works fine for me: > https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=f74f3771641d1e29bdd4de1444c43324 Aaah I still had `&mut`, and the auto-deref rules didn't work there. I see th

D8121: rust-dirstatemap: directly return `non_normal` and `other_entries`

2020-02-14 Thread Raphaël Gomès
Alphare created this revision. Herald added subscribers: mercurial-devel, kevincox. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This cleans up the interface which I previously thought needed to be uglier than in reality. No performance difference, simple refactoring. REPOSITORY

D8121: rust-dirstatemap: directly return `non_normal` and `other_entries`

2020-02-14 Thread Raphaël Gomès
Alphare updated this revision to Diff 20222. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8121?vs=20221&id=20222 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8121/new/ REVISION DETAIL https://phab.mercurial-scm.org/D81

<    1   2   3   4   5   6   7   8   9   10   >