D6271: rust-filepatterns: add a Rust implementation of pattern-related utils

2019-05-17 Thread Raphaël Gomès
Alphare updated this revision to Diff 15169. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6271?vs=15147&id=15169 REVISION DETAIL https://phab.mercurial-scm.org/D6271 AFFECTED FILES rust/Cargo.lock rust/hg-core/Cargo.toml rust/hg-core/src/ancesto

D6271: rust-filepatterns: add a Rust implementation of pattern-related utils

2019-05-17 Thread martinvonz (Martin von Zweigbergk)
martinvonz added inline comments. INLINE COMMENTS > martinvonz wrote in lib.rs:21 > Dropped from where? Where did the file use to be? It doesn't seem to be added > by this patch here in Phabricator. I get the same compilation error on > `b05c1041de8f`, which is the version before my `histedit`.

D6271: rust-filepatterns: add a Rust implementation of pattern-related utils

2019-05-17 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > martinvonz wrote in lib.rs:21 > Dropped from where? Where did the file use to be? It doesn't seem to be added > by this patch here in Phabricator. I get the same compilation error on > `b05c1041de8f`, which is the version before my `histedit`. I

D6271: rust-filepatterns: add a Rust implementation of pattern-related utils

2019-05-17 Thread martinvonz (Martin von Zweigbergk)
martinvonz added inline comments. INLINE COMMENTS > Alphare wrote in lib.rs:21 > It looks like the `filepatterns.rs` file was dropped. Maybe during a > `histedit` or other command, but it was definitely there when I sent my > patch, and I can't reproduce this issue locally, the file exists. Do

D6271: rust-filepatterns: add a Rust implementation of pattern-related utils

2019-05-17 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > martinvonz wrote in lib.rs:21 > I get the following from `HGWITHRUSTEXT= make local`: > > error[E0583]: file not found for module `filepatterns` > --> hg-core/src/lib.rs:21:5 > | > 21 | mod filepatterns; > | >

D6271: rust-filepatterns: add a Rust implementation of pattern-related utils

2019-05-16 Thread martinvonz (Martin von Zweigbergk)
martinvonz added inline comments. INLINE COMMENTS > martinvonz wrote in lib.rs:21 > I get the following from `HGWITHRUSTEXT= make local`: > > error[E0583]: file not found for module `filepatterns` > --> hg-core/src/lib.rs:21:5 > | > 21 | mod filepatterns; > | >

D6271: rust-filepatterns: add a Rust implementation of pattern-related utils

2019-05-16 Thread martinvonz (Martin von Zweigbergk)
martinvonz added inline comments. INLINE COMMENTS > lib.rs:21 > }; > +mod filepatterns; > + I get the following from `HGWITHRUSTEXT= make local`: error[E0583]: file not found for module `filepatterns` --> hg-core/src/lib.rs:21:5 | 21 | mod filepatterns; |

D6271: rust-filepatterns: add a Rust implementation of pattern-related utils

2019-05-16 Thread Raphaël Gomès
This revision was automatically updated to reflect the committed changes. Closed by commit rHGb05c1041de8f: rust-filepatterns: add a Rust implementation of pattern-related utils (authored by Alphare, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D6271?vs=15141&id=15147#

D6271: rust-filepatterns: add a Rust implementation of pattern-related utils

2019-05-16 Thread Raphaël Gomès
Alphare updated this revision to Diff 15141. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6271?vs=14905&id=15141 REVISION DETAIL https://phab.mercurial-scm.org/D6271 AFFECTED FILES rust/Cargo.lock rust/hg-core/Cargo.toml rust/hg-core/src/ancesto

D6271: rust-filepatterns: add a Rust implementation of pattern-related utils

2019-05-15 Thread durin42 (Augie Fackler)
durin42 requested changes to this revision. durin42 added a comment. This revision now requires changes to proceed. (forgot to tag as needing changes) REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6271 To: Alphare, #hg-reviewers, kevincox, durin42 Cc: durin42,

D6271: rust-filepatterns: add a Rust implementation of pattern-related utils

2019-05-15 Thread durin42 (Augie Fackler)
durin42 accepted this revision. durin42 added a comment. This revision is now accepted and ready to land. Meta-comment: we should extract an hgignore crate (with minimal other deps) and publish that, because that'd be a step towards automatic hgignore support in ripgrep (burntsushi has previo

D6271: rust-filepatterns: add a Rust implementation of pattern-related utils

2019-05-15 Thread durin42 (Augie Fackler)
durin42 added a comment. Ugh, but I got conflicts in Cargo.lock - could you rebase and let me know when you're ready? REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6271 To: Alphare, #hg-reviewers, kevincox, durin42 Cc: durin42, kevincox, mercurial-devel __

D6271: rust-filepatterns: add a Rust implementation of pattern-related utils

2019-04-24 Thread Raphaël Gomès
Alphare updated this revision to Diff 14905. Alphare marked 13 inline comments as done. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6271?vs=14904&id=14905 REVISION DETAIL https://phab.mercurial-scm.org/D6271 AFFECTED FILES rust/Cargo.lock rust/hg

D6271: rust-filepatterns: add a Rust implementation of pattern-related utils

2019-04-24 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > kevincox wrote in filepatterns.rs:61 > I don't understand. The example I showed would give a boolean. The only > difference I see is that the returned value would be 1 less (because > .position() wouldn't count the skipped element) but this shoul

D6271: rust-filepatterns: add a Rust implementation of pattern-related utils

2019-04-24 Thread kevincox (Kevin Cox)
kevincox accepted this revision. kevincox added a comment. Thanks for the changes. INLINE COMMENTS > Alphare wrote in filepatterns.rs:18 > I think I hit the same problem as the person in this issue: > `https://github.com/rust-lang/regex/issues/451`. It's a hassle to escape > bytes using the

D6271: rust-filepatterns: add a Rust implementation of pattern-related utils

2019-04-24 Thread Raphaël Gomès
Alphare added inline comments. INLINE COMMENTS > kevincox wrote in filepatterns.rs:18 > Why not use https://docs.rs/regex/1.1.6/regex/fn.escape.html? If you are > worried about performance you can use > https://docs.rs/regex-syntax/0.6.6/regex_syntax/fn.escape_into.html which is > quite fast.

D6271: rust-filepatterns: add a Rust implementation of pattern-related utils

2019-04-24 Thread Raphaël Gomès
Alphare updated this revision to Diff 14904. Alphare marked 12 inline comments as done. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6271?vs=14840&id=14904 REVISION DETAIL https://phab.mercurial-scm.org/D6271 AFFECTED FILES rust/Cargo.lock rust/hg

D6271: rust-filepatterns: add a Rust implementation of pattern-related utils

2019-04-20 Thread kevincox (Kevin Cox)
kevincox requested changes to this revision. kevincox added inline comments. This revision now requires changes to proceed. INLINE COMMENTS > filepatterns.rs:18 > +}; > +} > + Why not use https://docs.rs/regex/1.1.6/regex/fn.escape.html? If you are worried about performance you can use htt

D6271: rust-filepatterns: add a Rust implementation of pattern-related utils

2019-04-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 This change introduces Rust implementations of two functions related to pattern handling, all located in `match.py`: - `_regex` - `readpat