D7058: rust-dirstate-status: add first Rust implementation of `dirstate.status`

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Wed Oct 16 13:48:26 EDT 2019


martinvonz added inline comments.

INLINE COMMENTS

> status.rs:103-110
> +                    Err(ref e)
> +                        if e.kind() == std::io::ErrorKind::NotFound
> +                            || e.raw_os_error() == Some(20) =>
> +                    {
> +                        // Rust does not yet have an `ErrorKind` for
> +                        // `NotADirectory` (errno 20)
> +                        Ok((filename.to_owned(), None))

What does this case mean? I.e. why would we get "NotADirectory"? Oh, I guess if e.g. `dir/file` is in the dirstate, but `dir` is now a file? Could you add a comment here saying that that is what this is about?

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7058/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7058

To: Alphare, #hg-reviewers, kevincox
Cc: yuja, martinvonz, durin42, kevincox, mercurial-devel


More information about the Mercurial-devel mailing list