[Commented On] D9897: rust: use HgError in RevlogError and Vfs
Alphare (Raphaël Gomès)
phabricator at mercurial-scm.org
Fri Jan 29 13:51:15 UTC 2021
Alphare added a comment.
These changes start mixing user output with core logic, which didn't use to happen. Since we're not doing anything particular with those errors, I'm fine with that change (I makes the code a lot simpler and is a welcome change), but it's possible we'll have to re-introduce finer-grained errors if need be. The matter of i18n remains completely unsolved, but that's for another time.
INLINE COMMENTS
> repo.rs:73
> + let path = self.base.join(relative_path);
> + std::fs::read(&path).for_file(&path)
> }
I know this is makes for better errors, but the API is kind of clunky. Fortunately my solution would have been to encapsulate this... which is what the VFS is for.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D9897/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D9897
To: SimonSapin, #hg-reviewers
Cc: Alphare, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210129/71b7f771/attachment-0002.html>
More information about the Mercurial-patches
mailing list