This is an archive of the discontinued Mercurial Phabricator instance.

debian: support a "chg-first" installation mechanism (hg is actually chg)
ClosedPublic

Authored by spectral on Feb 18 2021, 6:35 PM.

Details

Summary

This mechanism builds chg such that it looks for hg to be available at
/usr/lib/mercurial/hg instead of in the $PATH as hg, and makes the hg in
/usr/bin be a symlink to chg.

It's important to note that the hg binary must continue to be named hg. If we
wanted to instead place it at /usr/bin/pyhg or something similar, we would need
to modify Mercurial to allow that basename. Failure to do so would break
Mercurial's shell aliases that use hg, chg, or $HG.

I don't know if we should ever have a setup like this be the default setup, but
I'm willing to get more information on our experience with it for making such a
determination. Actually making it the default might be rather involved, as we
don't maintain the official debian packaging rules.

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

spectral created this revision.Feb 18 2021, 6:35 PM

Adding yuja as an explicit reviewer.

durin42 accepted this revision as: durin42.Feb 24 2021, 11:01 AM
durin42 added a subscriber: durin42.

AFAICT this should be fine, but I'll give Yuya a while to catch problems.

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