This is an archive of the discontinued Mercurial Phabricator instance.

help: use "yes" and "no" for boolean defaults instead of "on" and "off"
AbandonedPublic

Authored by av6 on Dec 15 2018, 6:49 AM.

Details

Reviewers
durin42
Group Reviewers
hg-reviewers

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

av6 created this revision.Dec 15 2018, 6:49 AM
pulkit added a subscriber: pulkit.Dec 15 2018, 10:35 AM

TBH, I think 'on' and 'off' are more appropriate than 'yes' and 'no'.

av6 added a comment.Dec 15 2018, 1:03 PM

The point of D5430 was to make hg help output more human friendly by replacing True and False with something less Python-related. In other words, more human-friendly. "Yes" and "no" are way more human-friendly:

  • they are one of the most used words, so people naturally expect to see them, and can tell them apart from just "y" or "n" (they are also less ambiguous themselves — just look up how many meanings "on" or "off" has and how many parts of speech can they be),
  • they also work perfectly fine as answers to the flag descriptions (Consider hidden changesets? Yes, please. No, thanks.),
  • and "no" (more precisely, "no-") is the very same thing that users should add to the flags to negate them (not "--off-hidden").

Arguments against yes/no:

  1. "default: yes/no" can easily be read as "is this a default", which is not quite the same, although it would have the same effect.
  1. On/off fits well in sentences like "is --hidden on by default".

I see your arguments too (mostly the last one of them), but I still slightly prefer on/off.

yuja added a subscriber: yuja.Dec 15 2018, 8:48 PM

I feel --no-<thing> and --<thing>=off|false are more natural, and
(default: %s) is the latter form.

av6 abandoned this revision.Aug 25 2019, 8:54 AM