[PATCH 2 of 3] flags: allow specifying --boolean-flag=(true|false) on the command line (BC)

timeless timeless at gmail.com
Thu Aug 25 19:43:55 EDT 2016


>>> Is there documentation that needs to be updated to mention this is now possible?  (might be already done in another change in this series, but I didn't see it)
>>
>> I'm honestly not sure where to tuck this doc-wise, given that it matters for all boolean flags everywhere. Sigh. I'm very open to ideas...
>
> Here's one idea. I don't know how clear it is though. Left side of the diff is what we have today, right side of the diff is what I'm proposing. I don't love it, but maybe it helps?
>
> Kind of ugly though. Sigh.
> + -C --clean[=(true|false)] discard uncommitted changes (no backup)
> + -c --check[=(true|false)] require clean working directory
> +    --mq[=(true|false)]    operate on patch repository

I'm opposed to this style of docs. We should add some punctuation to
each option that will support --no-, tentatively, I'd suggest one of
`^`, ''~', or '!'.
And after the table include:

Options marked with '^' can be turned off using --no-[optionname] as
in --no-check.


More information about the Mercurial-devel mailing list