[Commented On] D10296: rhg: read [paths] for `--repository` value
Alphare (Raphaël Gomès)
phabricator at mercurial-scm.org
Thu May 27 07:30:43 UTC 2021
Alphare added inline comments.
INLINE COMMENTS
> pulkit wrote in main.rs:203
> Not sure what exact part in python will mean same as this one. But I see python code will raise `IOError` if it fails to read config from a file path passed.
This should probably do the same thing then.
> pulkit wrote in main.rs:221
> but we are puting `canpath.unwrap` in `Some()` again, will it work?
Ah sorry, I misread. This is `canpath.ok().or(non_repo_config_val)`. But you can use a `match` expression if you find it clearer also. `unwrap` raises an immediate alarm of "this can panic if not handled correctly or if the code changes in the future", so we try to avoid doing it in favor of letting the type system check all code paths for us.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10296/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10296
To: pulkit, #hg-reviewers, Alphare, SimonSapin
Cc: marmoute, SimonSapin, Alphare, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210527/ffc59b30/attachment-0002.html>
More information about the Mercurial-patches
mailing list