( )⚙ D10189 rhg: Remove `rhg.fallback-executable=hg` default configuration

This is an archive of the discontinued Mercurial Phabricator instance.

rhg: Remove `rhg.fallback-executable=hg` default configuration
ClosedPublic

Authored by SimonSapin on Mar 12 2021, 5:08 PM.

Details

Summary

When rhg.on-unsupported is configured to fallback and an unsupported
feature is encountered, the previous default was to look for an hg
executable in $PATH.

This default was fragile since it was easy to end up accidentally using
an older version of Mercurial installed system-wide,
when a local (perhaps patched) installation was intended.

Instead, it is now an error to have rhg.on-unsupported=fallback
without also configuring an explicit path or the fallback executable.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

SimonSapin created this revision.Mar 12 2021, 5:08 PM
marmoute accepted this revision.Mar 15 2021, 5:48 AM
marmoute added a subscriber: marmoute.

Looks overall good, with maybe a folow up for the message.

rust/rhg/src/main.rs
411–412

That message in a bit long, what about:

abort: 'rhg.on-unsupported=fallback' without 'rhg.fallback-executable' set.

to get < 80 char ?

baymax updated this revision to Diff 26352.Mar 15 2021, 9:10 AM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.