From c177f944d95c460803f8a894fd13d4901c3155fe Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 4 May 2021 08:06:36 -0400 Subject: 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 Tested-by: Mike Frysinger --- subcmds/manifest.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'subcmds/manifest.py') 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'. def _Options(self, p): p.add_option('-r', '--revision-as-HEAD', dest='peg_rev', action='store_true', - help='Save revisions as current HEAD') + help='save revisions as current HEAD') p.add_option('-m', '--manifest-name', help='temporary manifest to use for this sync', metavar='NAME.xml') p.add_option('--suppress-upstream-revision', dest='peg_rev_upstream', default=True, action='store_false', - help='If in -r mode, do not write the upstream field. ' - 'Only of use if the branch names for a sha1 manifest are ' - 'sensitive.') + help='if in -r mode, do not write the upstream field ' + '(only of use if the branch names for a sha1 manifest are ' + 'sensitive)') p.add_option('--suppress-dest-branch', dest='peg_rev_dest_branch', default=True, action='store_false', - help='If in -r mode, do not write the dest-branch field. ' - 'Only of use if the branch names for a sha1 manifest are ' - 'sensitive.') + help='if in -r mode, do not write the dest-branch field ' + '(only of use if the branch names for a sha1 manifest are ' + 'sensitive)') p.add_option('--json', default=False, action='store_true', - help='Output manifest in JSON format (experimental).') + help='output manifest in JSON format (experimental)') p.add_option('--pretty', default=False, action='store_true', - help='Format output for humans to read.') + help='format output for humans to read') p.add_option('-o', '--output-file', dest='output_file', default='-', - help='File to save the manifest to', + help='file to save the manifest to', metavar='-|NAME.xml') def _Output(self, opt): -- cgit v1.2.3-54-g00ecf