help/version: sprinkle bug report URL around

Make it a bit easier for people to locate bug reporting info.

Change-Id: If9c8939c84ebd52eb96b353c1797afa25868bb85
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/303943
Tested-by: Mike Frysinger <vapier@google.com>
Reviewed-by: Raman Tenneti <rtenneti@google.com>
This commit is contained in:
Mike Frysinger
2021-04-20 23:38:04 -04:00
parent cd89ec147a
commit a1cd770d56
5 changed files with 10 additions and 6 deletions

View File

@ -20,6 +20,7 @@ from subcmds import all_commands
from color import Coloring
from command import PagedCommand, MirrorSafeCommand, GitcAvailableCommand, GitcClientCommand
import gitc_utils
from wrapper import Wrapper
class Help(PagedCommand, MirrorSafeCommand):
@ -78,6 +79,7 @@ Displays detailed usage information about a command.
print(
"See 'repo help <command>' for more information on a specific command.\n"
"See 'repo help --all' for a complete list of recognized commands.")
print('Bug reports:', Wrapper().BUG_URL)
def _PrintCommandHelp(self, cmd, header_prefix=''):
class _Out(Coloring):

View File

@ -18,6 +18,7 @@ import sys
from command import Command, MirrorSafeCommand
from git_command import git, RepoSourceVersion, user_agent
from git_refs import HEAD
from wrapper import Wrapper
class Version(Command, MirrorSafeCommand):
@ -62,3 +63,4 @@ class Version(Command, MirrorSafeCommand):
print('OS %s %s (%s)' % (uname.system, uname.release, uname.version))
print('CPU %s (%s)' %
(uname.machine, uname.processor if uname.processor else 'unknown'))
print('Bug reports:', Wrapper().BUG_URL)