This is an archive of the discontinued Mercurial Phabricator instance.

rhg: add ui.plain() and check it before showing relative paths in status
ClosedPublic

Authored by pulkit on Jun 25 2021, 5:34 AM.

Details

Summary

Adds a very basic replica of ui.plain().

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

pulkit created this revision.Jun 25 2021, 5:34 AM
SimonSapin added inline comments.
rust/rhg/src/ui.rs
70–73

This can be spelled env::var("HGPLAIN").is_ok().

However env::var has two error cases. If we only want to check for the presence of a variable regardless of its Unicode validity, env::var_os("HGPLAIN").is_some() should be used instead.

baymax updated this revision to Diff 28698.Jun 25 2021, 7:59 AM

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

SimonSapin accepted this revision.Jun 29 2021, 11:54 AM
martinvonz accepted this revision.Oct 11 2021, 1:55 PM
This revision is now accepted and ready to land.Oct 11 2021, 1:55 PM