Feed Advanced Search

Wed, Apr 17

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.

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

Mon, Apr 15

kevincox added inline comments to D6231: rust-discovery: starting core implementation.
Mon, Apr 15, 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.

Mon, Apr 15, 12:43 PM
kevincox added inline comments to D6230: rust-dagops: roots.
Mon, Apr 15, 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.

Mon, Apr 15, 6:21 AM

Sun, Apr 14

kevincox accepted D6233: rust-discovery: implementing and exposing stats().
Sun, Apr 14, 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.

Sun, Apr 14, 4:14 PM
kevincox accepted D6232: rust-discovery: cpython bindings for the core logic.
Sun, Apr 14, 4:11 PM
kevincox accepted D6230: rust-dagops: roots.
Sun, Apr 14, 3:51 PM
kevincox accepted D6229: rust-dagops: range of revisions.
Sun, Apr 14, 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