diff options
author | Mike Frysinger <vapier@google.com> | 2021-05-04 08:06:36 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2021-05-04 16:40:53 +0000 |
commit | c177f944d95c460803f8a894fd13d4901c3155fe (patch) | |
tree | 1645c1bcf6e2cd304600ebc1f5193a0edf329429 /subcmds/manifest.py | |
parent | aedd1e5ef015fba194681e167edf460c21a1c980 (diff) | |
download | git-repo-c177f944d95c460803f8a894fd13d4901c3155fe.tar.gz |
subcmds: force consistent help text format
We're inconsistent with help text as to whether it uses title case and
whether it ends in a period. Add a test to enforce a standard, and use
the style that Python optparse & argparse use themselves (e.g. with the
--help option): always lowercase, and never trailing period.
Change-Id: Ic1defae23daeac0ac9116aaf487427f50b34050d
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/305144
Reviewed-by: Raman Tenneti <rtenneti@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'subcmds/manifest.py')
-rw-r--r-- | subcmds/manifest.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/subcmds/manifest.py b/subcmds/manifest.py index e33e683c..965c36e9 100644 --- a/subcmds/manifest.py +++ b/subcmds/manifest.py | |||
@@ -53,27 +53,27 @@ to indicate the remote ref to push changes to via 'repo upload'. | |||
53 | def _Options(self, p): | 53 | def _Options(self, p): |
54 | p.add_option('-r', '--revision-as-HEAD', | 54 | p.add_option('-r', '--revision-as-HEAD', |
55 | dest='peg_rev', action='store_true', | 55 | dest='peg_rev', action='store_true', |
56 | help='Save revisions as current HEAD') | 56 | help='save revisions as current HEAD') |
57 | p.add_option('-m', '--manifest-name', | 57 | p.add_option('-m', '--manifest-name', |
58 | help='temporary manifest to use for this sync', metavar='NAME.xml') | 58 | help='temporary manifest to use for this sync', metavar='NAME.xml') |
59 | p.add_option('--suppress-upstream-revision', dest='peg_rev_upstream', | 59 | p.add_option('--suppress-upstream-revision', dest='peg_rev_upstream', |
60 | default=True, action='store_false', | 60 | default=True, action='store_false', |
61 | help='If in -r mode, do not write the upstream field. ' | 61 | help='if in -r mode, do not write the upstream field ' |
62 | 'Only of use if the branch names for a sha1 manifest are ' | 62 | '(only of use if the branch names for a sha1 manifest are ' |
63 | 'sensitive.') | 63 | 'sensitive)') |
64 | p.add_option('--suppress-dest-branch', dest='peg_rev_dest_branch', | 64 | p.add_option('--suppress-dest-branch', dest='peg_rev_dest_branch', |
65 | default=True, action='store_false', | 65 | default=True, action='store_false', |
66 | help='If in -r mode, do not write the dest-branch field. ' | 66 | help='if in -r mode, do not write the dest-branch field ' |
67 | 'Only of use if the branch names for a sha1 manifest are ' | 67 | '(only of use if the branch names for a sha1 manifest are ' |
68 | 'sensitive.') | 68 | 'sensitive)') |
69 | p.add_option('--json', default=False, action='store_true', | 69 | p.add_option('--json', default=False, action='store_true', |
70 | help='Output manifest in JSON format (experimental).') | 70 | help='output manifest in JSON format (experimental)') |
71 | p.add_option('--pretty', default=False, action='store_true', | 71 | p.add_option('--pretty', default=False, action='store_true', |
72 | help='Format output for humans to read.') | 72 | help='format output for humans to read') |
73 | p.add_option('-o', '--output-file', | 73 | p.add_option('-o', '--output-file', |
74 | dest='output_file', | 74 | dest='output_file', |
75 | default='-', | 75 | default='-', |
76 | help='File to save the manifest to', | 76 | help='file to save the manifest to', |
77 | metavar='-|NAME.xml') | 77 | metavar='-|NAME.xml') |
78 | 78 | ||
79 | def _Output(self, opt): | 79 | def _Output(self, opt): |