This is a short topic to explain how command-line flags can be specified.
Some users have been confused by hg offerring different flag syntax than some
other libraries, so it'd be nice to point them to this rather than explaining
it every time.
durin42 | |
yuja |
hg-reviewers |
This is a short topic to explain how command-line flags can be specified.
Some users have been confused by hg offerring different flag syntax than some
other libraries, so it'd be nice to point them to this rather than explaining
it every time.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
We're in code freeze for approximately two more days, so this will have to wait until ~Thursday. Still, thanks for the patch. I'm happy to include something like this. Things that struck me as missing:
We don't necessarily have to include all that in the first patch.
mercurial/help/flags.txt | ||
---|---|---|
31 | hg help config says that "defaults" are deprecated and that aliases should be used instead. |
mercurial/help/flags.txt | ||
---|---|---|
8 | This "lists of strings" caught my attention, but it took me some time to figure out what's the matter. I don't feel strongly, but here are some points:
I think this data type is a result of looking at the internals that allow some python variables (associated with handling command line flags in the code) to be lists, but because our CLI is not python, this phrase is more distracting than helpful. I think taking the note that's in hg help and explaining it is better: "[+] can be repeated" (essentially merging "Specifying list flags" and "Overriding flag defaults"). | |
36 | This is a weird-looking macro. Does it work when rendered into e.g. HTML (can be seen hgweb)? I've only seen this format: :hg:`help config` | |
50 | There are also global flags, they are hidden by default too. I guess you can put them into these 3 categories, but I don't think of --quiet or --verbose as advanced (much less experimental or deprecated). Just a nitpick. |
Tried to address all of these.
mercurial/help/flags.txt | ||
---|---|---|
8 | That's the whole point of the "Specifying list flags" section below, and in fact what motivated me to send this patch. | |
36 | Assume that I don't know what I'm doing, as far as the format of this file is concerned :) I just tried hgweb and fixed a few things. | |
50 | --verbose is used to show those flags in hg help, it's not that that flag itself is advanced. |
mercurial/help/flags.txt | ||
---|---|---|
9 | The final "and can be specified" sounds a little truncated. Was there supposed to be something after? Or maybe it's no longer needed since you already said "can be used with any command"? | |
37–40 | -ffoo is also valid | |
68 | Do we recommend overriding the command like this or should the left side be called something else (maybe "icommit")? I really don't know what we recommend here, so don't take my question to imply that you shouldn't do it the way you have done it. | |
87 | should be committemp here | |
95 | s/simplify/simply/ |
mercurial/help/flags.txt | ||
---|---|---|
68 | That's my interpretation of what "hg help commit" says, but if you want me to change it let me know. |
I'm +1 on this, but won't accept as a reviewer since I've got at least two biases here (it makes permanent my --no- boolean prefix for flags, and it'll solve some support problems at G).
Removed -f=foo and queued, thanks.
it makes permanent my --no- boolean prefix for flags,
Perhaps we can add some note saying --no- is still experimental?
mercurial/help/flags.txt | ||
---|---|---|
40 | This is wrong. -f=foo is identical to -f =foo. |
This "lists of strings" caught my attention, but it took me some time to figure out what's the matter. I don't feel strongly, but here are some points:
I think this data type is a result of looking at the internals that allow some python variables (associated with handling command line flags in the code) to be lists, but because our CLI is not python, this phrase is more distracting than helpful. I think taking the note that's in hg help and explaining it is better: "[+] can be repeated" (essentially merging "Specifying list flags" and "Overriding flag defaults").