Details
- Reviewers
Alphare - Group Reviewers
hg-reviewers
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
Event Timeline
Why do we want it the default behavior in general instead of the default behavior just during the test ?
My first though is that it seems safer to keep the explicit abort at this stage of the project. Whats your reasoning to flipping the switch now?
My reasoning is that we don’t want to push onto users the burden of keeping track of what functionality is supported natively by rhg or not, especially since we want that set to grow over time. Enabling fallback and using rhg as a drop-in replacement for hg that behaves the same (modulo speed and possible bugs) seems to me like the only scenario where rhg is really useful. The "abort with an error message" exists for tests where we want to assert that something is supported natively. The "abort silently" mode was initially designed to let a wrapper script implement fallback, but there’s no point "leaving that as an exercise to readers" if rhg can do it itself.
Just my two cents:
The "abort silently" mode was initially designed to let a wrapper script implement fallback, but there’s no point "leaving that as an exercise to readers" if rhg can do it itself.
Having a built-in fallback is good for ease of use, but we should also keep the external fallback with 252 exit code (not that you've ever said the contrary, just making sure).
Now that rhg is testable through (almost) the entire CI, I think we should encourage the default value to be something usable for users, I agree with Simon.
But as far as I understand, the default fallback value is the standard hg executable which is arbitrary and dangerous. For example if a user want to test the behavior of the new mercurial compares to the older one and directly call /some/path/rust/target/release/rhg, it will silently fall back to the system hg which is a pretty surprising behavior.
Marmoute makes a good point about the default to looking up hg in $PATH being fragile, making it easy to accidentally use not the expected installation of Mercurial.
This is replaced by https://phab.mercurial-scm.org/D10187 and https://phab.mercurial-scm.org/D10189