Page MenuHomePhabricator

kevincox (Kevin Cox)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 11 2018, 4:59 AM (91 w, 5 d)

kevincox@kevincox.ca

Recent Activity

Yesterday

kevincox added a comment to D7058: rust-dirstate-status: add first Rust implementation of `dirstate.status`.

Thanks, looks good.

Tue, Oct 15, 10:48 AM
kevincox accepted D7059: rust-dirstate-status: rust-cpython bindings for `dirstate.status`.
Tue, Oct 15, 10:46 AM
kevincox accepted D7107: rust-cross-platform: remove `unimplemented!` to get compile-time errors instead.
Tue, Oct 15, 10:44 AM
D7058: rust-dirstate-status: add first Rust implementation of `dirstate.status` now requires changes to proceed.
Tue, Oct 15, 9:12 AM

Sep 13 2019

kevincox accepted D6773: rust-hgpath: add HgPath and HgPathBuf structs to encapsulate handling of paths.
Sep 13 2019, 6:49 AM

Sep 12 2019

kevincox accepted D6774: rust-hgpath: replace all paths and filenames with HgPath/HgPathBuf.
Sep 12 2019, 4:25 AM

Aug 30 2019

kevincox accepted D6773: rust-hgpath: add HgPath and HgPathBuf structs to encapsulate handling of paths.
Aug 30 2019, 11:13 AM
D6773: rust-hgpath: add HgPath and HgPathBuf structs to encapsulate handling of paths now requires changes to proceed.

It looks good overall. I just would like to have a bit more strict definition of what an HgPath can contain and preferably some init-time validation.

Aug 30 2019, 5:38 AM

Aug 28 2019

kevincox accepted D6770: rust: fix warnings about trait objects without dyn being deprecated.
Aug 28 2019, 8:24 AM
kevincox added inline comments to D6765: rustfilepatterns: shorter code for concatenating slices.
Aug 28 2019, 7:48 AM
kevincox accepted D6766: rustfilepatterns: refactor the pattern of removing a prefix from a &[u8].
Aug 28 2019, 5:33 AM
kevincox accepted D6765: rustfilepatterns: shorter code for concatenating slices.
Aug 28 2019, 5:26 AM
kevincox accepted D6756: rust-utils: add normalize_case util to mirror Python one.
Aug 28 2019, 5:21 AM

Aug 12 2019

kevincox added a comment to D6631: rust-cpython: add macro for sharing references.

@kevincox I've renamed the file since it no longer just contains macros.
I've moved whatever I could move to separate structs and used Cell instead of RefCell on those scalar types. I'm not so keen on using UnsafeCell, espacially since the target py_class!-resulting struct could be using RefCell-specific APIs.

Aug 12 2019, 12:11 PM

Jul 22 2019

kevincox updated kevincox.
Jul 22 2019, 11:30 AM
kevincox added a comment to D6516: rust-discovery: accept the new 'respectsize' init arg.

It seems weird to add this argument without using it. I would much rather it was added as the implementation was added.

Jul 22 2019, 11:25 AM
kevincox accepted D6632: rust-dirstate: rust implementation of dirstatemap.
Jul 22 2019, 11:10 AM

Jul 17 2019

kevincox added inline comments to D6629: rust-dirstate: use EntryState enum instead of literals.
Jul 17 2019, 7:35 AM

Jul 16 2019

kevincox added a comment to D6631: rust-cpython: add macro for sharing references.

Is there any reason this can't be done using Rc<RefCell<DirsMultiset>>? I have an example here: https://rust.godbolt.org/z/MNNR_F

Jul 16 2019, 9:13 AM
kevincox added a comment to D6631: rust-cpython: add macro for sharing references.

Is there any reason this can't be done using Rc<RefCell<DirsMultiset>>? I have an example here: https://rust.godbolt.org/z/MNNR_F

Jul 16 2019, 7:12 AM

Jul 15 2019

kevincox accepted D6628: rust-parsers: switch to parse/pack_dirstate to mutate-on-loop.
Jul 15 2019, 12:24 PM
kevincox accepted D6629: rust-dirstate: use EntryState enum instead of literals.
Jul 15 2019, 12:08 PM
kevincox accepted D6630: rust-docstrings: add missing module docstrings.
Jul 15 2019, 11:52 AM

Jul 12 2019

kevincox accepted D6626: rust-dirstate: create dirstate submodule in hg-cpython.
Jul 12 2019, 11:52 AM

Jul 10 2019

kevincox added a comment to D6594: [ABANDONED] RFC dirstatemap.
In D6594#96518, @yuja wrote:

Yes, so we'll probably want to minimize the data exchanged between Rust
and Python. This means we'll eventually move more logic to Rust side, which
hopefully reduce the number of elements to be exposed through the iterator
interface. Until then, it might be better to move iterator-heavy objects
to CPython/PyO3 layer. Just my guess.

Jul 10 2019, 11:28 AM
kevincox added inline comments to D6593: rust-minor-fixes: remove Deref in favor of explicit methods.
Jul 10 2019, 11:22 AM
kevincox added a comment to D6597: rust-2018: switch hg-core and hg-cpython to rust 2018 edition.

Is the SliceExt change related to the 2018 change? If not could you split the two?

Jul 10 2019, 10:53 AM

Jul 4 2019

kevincox accepted D6591: rust-minor-fixes: run rfmt on all hg-core/hg-cpython code.
Jul 4 2019, 11:20 AM
kevincox added inline comments to D6594: [ABANDONED] RFC dirstatemap.
Jul 4 2019, 11:19 AM
kevincox accepted D6592: rust-minor-fixes: simplify overly complicated expression.
Jul 4 2019, 11:01 AM

Jun 28 2019

kevincox added inline comments to D6393: rust-dirstate: add "dirs" Rust implementation.
Jun 28 2019, 5:01 AM

Jun 24 2019

kevincox added a comment to D6393: rust-dirstate: add "dirs" Rust implementation.

Sorry. I was busy. In general don't worry about blocking on me, I can't promise any sort of reasonable response time. Worst case I can review the changes after submission and changes can be made afterwards.

Jun 24 2019, 9:46 AM

Jun 14 2019

kevincox accepted D6395: rust-dirstate: call new "dirs" rust implementation from Python.
Jun 14 2019, 6:18 AM

Jun 13 2019

kevincox added a comment to D6429: rust-discovery: optimization of add commons/missings for empty arguments.

Thanks, looks good.

Jun 13 2019, 10:00 AM
kevincox accepted D6517: rust-discovery: read the index from a repo passed at init.
Jun 13 2019, 6:05 AM

Jun 10 2019

kevincox accepted D6489: rust-regex: fix shortcut for exact matches.
Jun 10 2019, 9:14 AM
kevincox accepted D6485: rust-filepatterns: use bytes instead of String.
Jun 10 2019, 9:12 AM
kevincox accepted D6394: rust-dirstate: add "dirs" rust-cpython binding.
Jun 10 2019, 9:06 AM
kevincox accepted D6428: rust-discovery: using the children cache in add_missing.
Jun 10 2019, 8:59 AM
kevincox requested changes to D6429: rust-discovery: optimization of add commons/missings for empty arguments.

Wouldn't it be better to make add_missing_revisions work properly on empty inputs? It seems like it is too error prone to try and catch every caller. If possible I would like to push this check down as far as possible.

Jun 10 2019, 8:53 AM
kevincox accepted D6427: discovery: new devel.discovery.randomize option.
Jun 10 2019, 8:39 AM

May 24 2019

kevincox accepted D6389: rust-dirstate: create dirstate submodule.
May 24 2019, 5:53 AM
kevincox added inline comments to D6389: rust-dirstate: create dirstate submodule.
May 24 2019, 5:07 AM

May 23 2019

kevincox accepted D6426: rust-discovery: optionally don't randomize at all, for tests.
May 23 2019, 11:15 AM
kevincox accepted D6425: rust-discovery: exposing sampling to python.
May 23 2019, 10:55 AM
kevincox accepted D6424: rust-discovery: takefullsample() core implementation.
May 23 2019, 10:53 AM
kevincox accepted D6423: rust-discovery: core implementation for take_quick_sample().
May 23 2019, 10:47 AM

May 17 2019

kevincox added inline comments to D6389: rust-dirstate: create dirstate submodule.
May 17 2019, 9:37 AM

May 10 2019

kevincox requested changes to D6348: rust-dirstate: add rust implementation of `parse_dirstate` and `pack_dirstate`.
May 10 2019, 11:04 AM
kevincox accepted D6345: rust-discovery: optionally don't randomize at all, for tests.

The code and rust style looks fine. I'm not sure that taking the N smallest elements is the best approach for testing though. I can imagine it hiding some issues with larger values.

May 10 2019, 9:46 AM

Apr 24 2019

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

Thanks for the changes.

Apr 24 2019, 5:58 AM

Apr 20 2019

kevincox requested changes to D6271: rust-filepatterns: add a Rust implementation of pattern-related utils.
Apr 20 2019, 4:22 PM
kevincox accepted D6257: rust-discovery: core implementation for take_quick_sample().
Apr 20 2019, 2:52 PM

Apr 17 2019

kevincox added a comment to D6231: rust-discovery: starting core implementation.

I believe to have addressed your immediate concerns.
I played with splitting in different structs for the various stages of the process. It is indeed cleaner and clearer Rust code.
However mutating in place of Enums exposed to Python is a bit of a headache, because of the wrapping in RefCell<Box<T>>, and I don't have a solution for that, so I'm gonna think about that in a follow-up.

Apr 17 2019, 8:58 AM
kevincox accepted D6260: rust-discovery: takefullsample() core implementation.
Apr 17 2019, 8:58 AM
kevincox accepted D6261: rust-discovery: exposing sampling to python.
Apr 17 2019, 8:38 AM

Apr 15 2019

kevincox added inline comments to D6231: rust-discovery: starting core implementation.
Apr 15 2019, 12:59 PM
kevincox added a comment to D6231: rust-discovery: starting core implementation.

Yes, that's what I had in mind. Not sure where that enum would be defined (hg-cpython or hg-core) but it doesn't matter so much.

Apr 15 2019, 12:43 PM
kevincox added inline comments to D6230: rust-dagops: roots.
Apr 15 2019, 6:23 AM
kevincox added a comment to D6231: rust-discovery: starting core implementation.

That's an interesting idea. I expect it to solve my gripes with ensure_undecided() neatly. I'm not sure how it'd fare on the Python side, and probably wouldn't do it in the bindings to maintain compatibility, but I'll play with it a bit.

Apr 15 2019, 6:21 AM

Apr 14 2019

kevincox accepted D6233: rust-discovery: implementing and exposing stats().
Apr 14 2019, 4:15 PM
kevincox accepted D6231: rust-discovery: starting core implementation.

I'm not a huge fan of the design of this class because it has a strong protocol to use correctly. It would probably be better to have 3 classes and when you apply new information each class transitions into the next one. This allows the type system to ensure that you are using the class correctly. However it appears that this is just re-implementing an API so improving that API is probably out of scope for the time being.

Apr 14 2019, 4:14 PM
kevincox accepted D6232: rust-discovery: cpython bindings for the core logic.
Apr 14 2019, 4:11 PM
kevincox accepted D6230: rust-dagops: roots.
Apr 14 2019, 3:51 PM
kevincox accepted D6229: rust-dagops: range of revisions.
Apr 14 2019, 3:45 PM

Feb 16 2019

kevincox added inline comments to D5945: rust: itering less on MissingAncestors.bases for max().
Feb 16 2019, 1:37 AM

Feb 12 2019

kevincox added inline comments to D5945: rust: itering less on MissingAncestors.bases for max().
Feb 12 2019, 5:20 PM
kevincox accepted D5945: rust: itering less on MissingAncestors.bases for max().
Feb 12 2019, 9:58 AM
kevincox accepted D5944: rust: stop putting NULL_REVISION in MissingAncestors.bases.
Feb 12 2019, 9:54 AM
kevincox accepted D5943: rust: less set lookups in MissingAncestors.
Feb 12 2019, 9:42 AM

Jan 15 2019

kevincox accepted D5579: rust: factorized testing Graphs.
Jan 15 2019, 2:58 PM
kevincox accepted D5580: rust: dagop.headrevs() Rust counterparts.
Jan 15 2019, 2:55 PM
kevincox accepted D5581: rust-cpython: set conversion for MissingAncestors.bases().
Jan 15 2019, 2:46 PM
kevincox added inline comments to D5550: rust-cpython: bindings for MissingAncestors.
Jan 15 2019, 3:02 AM

Jan 14 2019

kevincox added inline comments to D5550: rust-cpython: bindings for MissingAncestors.
Jan 14 2019, 6:16 PM

Jan 12 2019

kevincox added inline comments to D5550: rust-cpython: bindings for MissingAncestors.
Jan 12 2019, 6:30 AM

Jan 3 2019

kevincox added a comment to D5441: rust-cpython: binding for LazyAncestors.
In D5441#81222, @yuja wrote:

Anyway, I just thought using CamelCase in Rust would be slightly nicer and
simpler. If that makes things complicated, I'll drop my idea and stick to
anything that is simpler.

Jan 3 2019, 10:24 AM

Dec 22 2018

kevincox accepted D5441: rust-cpython: binding for LazyAncestors.
Dec 22 2018, 11:57 AM

Dec 15 2018

kevincox accepted D5441: rust-cpython: binding for LazyAncestors.
Dec 15 2018, 8:14 AM
kevincox accepted D5440: rust: core implementation for lazyancestors.
Dec 15 2018, 8:08 AM
kevincox accepted D5439: rust-cpython: binding for AncestorsIterator.
Dec 15 2018, 7:59 AM

Dec 12 2018

kevincox added inline comments to D5416: rust: translation of missingancestors.
Dec 12 2018, 1:59 PM
kevincox added a comment to D5415: rust: changed Graph.parents to return [Revision; 2].

This is a nice improvement. It still seems odd to me to return a list of two parents when there could be 0, 1 or 2 parents. I guess this is for performance reasons?

Dec 12 2018, 11:11 AM

Dec 6 2018

kevincox added a comment to D5370: rust: core implementation of missingancestors (no bindings).

I think sticking close to the python version makes sense for the initial version. Then improvements can be made in follow-ups.

Dec 6 2018, 7:12 AM

Dec 4 2018

kevincox added a comment to D5370: rust: core implementation of missingancestors (no bindings).

Overall looks good to me. Just a couple of points.

Dec 4 2018, 7:18 PM

May 6 2018

kevincox created D3454: Assign to result from block..
May 6 2018, 4:17 AM
kevincox accepted D3447: rust: make exit handling consistent with `hg`.
May 6 2018, 3:51 AM

Mar 24 2018

kevincox added a comment to D2057: rust implementation of hg status.

The latest changes are looking really good. I have a couple more comments but I didn't have time for a full review. I'll try to get more reviewed tomorrow. It seems that you still have a lot of stuff still in-flight so I'll try to slowly review the changes as I have time. If you want input/feedback on any particular part just ask and I will prioritize it.

Mar 24 2018, 6:45 AM

Mar 21 2018

kevincox added a comment to D2057: rust implementation of hg status.

Ah, I forgot to consider the python interop. Now the need for that crate makes sense. Thanks for explaining.

Mar 21 2018, 6:20 AM

Mar 20 2018

kevincox added a comment to D2057: rust implementation of hg status.

I'm not a windows expert but it seems like the rust OsStr, Path and filesystem APIs should handle these conversions for you. I think the only place where you would need to do os-specific code is when doing serialization and serialization which I think should be handled by https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStringExt.html and https://doc.rust-lang.org/std/os/windows/ffi/trait.OsStringExt.html.

Mar 20 2018, 4:22 PM

Mar 8 2018

kevincox added a comment to D2057: rust implementation of hg status.

Rust has platform independent types PathBuf and &Path for paths and OsString and &OsStr for strings (owned and references respectively. They do have os-specific extensions but as long as you don't use them it should be cross platform. That being said, if you are serializing and deserializing them you may need to write some platform dependant code.

Mar 8 2018, 2:12 PM
kevincox added a comment to D2057: rust implementation of hg status.

Mercurial tries to be principled about always treating filenames as bytes. AIUI https://www.mercurial-scm.org/wiki/WindowsUTF8Plan is still the plan of record there?

Mar 8 2018, 1:08 PM
kevincox requested changes to D2057: rust implementation of hg status.

I will try to finish the review later, but it might be quicker if you incorporate some of the changes first since a lot of them are repeated many times. Overall it looks good, there are a couple of things that i would highlight to make the code easier to read.

Mar 8 2018, 12:33 PM

Feb 7 2018

kevincox added a comment to D2057: rust implementation of hg status.

I agree with the splitting comments :) In fact there might already be a base85 crate which can be used: https://docs.rs/zero85. Either way I'll hold off on the review, feel free to ping me when you are ready for me to take a look.

Feb 7 2018, 6:11 AM

Jan 11 2018

kevincox added inline comments to D1581: rust: implementation of `hg`.
Jan 11 2018, 8:09 AM
kevincox added a comment to D1581: rust: implementation of `hg`.

Overall it looks great. I added a bunch of nitpicks. The most common suggestion was to add some contextual information to error messages. Other then that mostly minor style improvements. Feel free to push back on anything you don't agree with :)

Jan 11 2018, 6:01 AM