update markdown/help header format

Since gitiles recommends using # headers over ---/=== underlines,
change the manifest-format.md over and all our help texts.

Change-Id: I96391d41fba769e9f26870d497cf7cf01c8d8ab3
This commit is contained in:
Mike Frysinger
2018-10-10 01:05:11 -04:00
parent 3891b7519d
commit b8f7bb04d0
9 changed files with 27 additions and 65 deletions

View File

@ -67,8 +67,7 @@ class Branches(Command):
Summarizes the currently available topic branches.
Branch Display
--------------
# Branch Display
The branch display output by this command is organized into four
columns of information; for example:

View File

@ -53,8 +53,7 @@ Executes the same shell command in each project.
The -r option allows running the command only on projects matching
regex or wildcard expression.
Output Formatting
-----------------
# Output Formatting
The -p option causes '%prog' to bind pipes to the command's stdin,
stdout and stderr streams, and pipe all output into a continuous
@ -71,8 +70,7 @@ command produces output only on stderr. Normally the -p option
causes command output to be suppressed until the command produces
at least one byte of output on stdout.
Environment
-----------
# Environment
pwd is the project's working directory. If the current client is
a mirror client, then pwd is the Git repository.

View File

@ -33,8 +33,7 @@ class Grep(PagedCommand):
helpDescription = """
Search for the specified patterns in all project files.
Boolean Options
---------------
# Boolean Options
The following options can appear as often as necessary to express
the pattern to locate:
@ -47,8 +46,7 @@ in order to scan multiple trees. If the same file matches in more
than one tree, only the first result is reported, prefixed by the
revision name it was found under.
Examples
-------
# Examples
Look for a line that has '#define' and either 'MAX_PATH or 'PATH_MAX':

View File

@ -107,15 +107,13 @@ Displays detailed usage information about a command.
self.heading('%s', heading)
self.nl()
self.heading('%s', ''.ljust(len(heading), '-'))
self.nl()
me = 'repo %s' % cmd.NAME
body = body.strip()
body = body.replace('%prog', me)
asciidoc_hdr = re.compile(r'^\n?([^\n]{1,})\n([=~-]{2,})$')
asciidoc_hdr = re.compile(r'^\n?#+ (.+)$')
for para in body.split("\n\n"):
if para.startswith(' '):
self.write('%s', para)
@ -125,19 +123,8 @@ Displays detailed usage information about a command.
m = asciidoc_hdr.match(para)
if m:
title = m.group(1)
section_type = m.group(2)
if section_type[0] in ('=', '-'):
p = self.heading
else:
def _p(fmt, *args):
self.write(' ')
self.heading(fmt, *args)
p = _p
p('%s', title)
self.heading(m.group(1))
self.nl()
p('%s', ''.ljust(len(title), section_type[0]))
self.nl()
continue

View File

@ -67,8 +67,7 @@ resumeable bundle file on a content delivery network. This
may be necessary if there are problems with the local Python
HTTP client or proxy configuration, but the Git binary works.
Switching Manifest Branches
---------------------------
# Switching Manifest Branches
To switch to another manifest branch, `repo init -b otherbranch`
may be used in an existing client. However, as this only updates the

View File

@ -49,8 +49,7 @@ includes deeper items. For example, if dir/subdir/proj1 and
dir/subdir/proj2 are repo projects, dir/subdir/proj3 will be shown
if it is not known to repo.
Status Display
--------------
# Status Display
The status display is organized into three columns of information,
for example if the file 'subcmds/status.py' is modified in the

View File

@ -155,8 +155,7 @@ exist locally.
The --prune option can be used to remove any refs that no longer
exist on the remote.
SSH Connections
---------------
# SSH Connections
If at least one project remote URL uses an SSH connection (ssh://,
git+ssh://, or user@host:path syntax) repo will automatically
@ -170,8 +169,7 @@ environment variable to 'ssh'. For example:
export GIT_SSH=ssh
%prog
Compatibility
~~~~~~~~~~~~~
# Compatibility
This feature is automatically disabled on Windows, due to the lack
of UNIX domain socket support.

View File

@ -78,8 +78,7 @@ added to the respective list of users, and emails are sent to any
new users. Users passed as --reviewers must already be registered
with the code review system, or the upload will fail.
Configuration
-------------
# Configuration
review.URL.autoupload:
@ -126,8 +125,7 @@ is set to "true" then repo will assume you always want the equivalent
of the -t option to the repo command. If unset or set to "false" then
repo will make use of only the command line option.
References
----------
# References
Gerrit Code Review: http://code.google.com/p/gerrit/