diff options
author | Mike Frysinger <vapier@google.com> | 2021-04-20 23:38:04 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2021-04-26 21:43:43 +0000 |
commit | a1cd770d566400364c43acd40b980a7138820797 (patch) | |
tree | 2147bd26a440c3129930eb4f29fb551748dc475c | |
parent | cd89ec147ad59f19ebe16a4a30b13606102213c0 (diff) | |
download | git-repo-a1cd770d566400364c43acd40b980a7138820797.tar.gz |
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>
-rw-r--r-- | error.py | 4 | ||||
-rw-r--r-- | git_superproject.py | 4 | ||||
-rwxr-xr-x | repo | 4 | ||||
-rw-r--r-- | subcmds/help.py | 2 | ||||
-rw-r--r-- | subcmds/version.py | 2 |
5 files changed, 10 insertions, 6 deletions
@@ -13,10 +13,6 @@ | |||
13 | # limitations under the License. | 13 | # limitations under the License. |
14 | 14 | ||
15 | 15 | ||
16 | # URL to file bug reports for repo tool issues. | ||
17 | BUG_REPORT_URL = 'https://bugs.chromium.org/p/gerrit/issues/entry?template=Repo+tool+issue' | ||
18 | |||
19 | |||
20 | class ManifestParseError(Exception): | 16 | class ManifestParseError(Exception): |
21 | """Failed to parse the manifest file. | 17 | """Failed to parse the manifest file. |
22 | """ | 18 | """ |
diff --git a/git_superproject.py b/git_superproject.py index 89320971..2516545d 100644 --- a/git_superproject.py +++ b/git_superproject.py | |||
@@ -26,9 +26,9 @@ import hashlib | |||
26 | import os | 26 | import os |
27 | import sys | 27 | import sys |
28 | 28 | ||
29 | from error import BUG_REPORT_URL | ||
30 | from git_command import GitCommand | 29 | from git_command import GitCommand |
31 | from git_refs import R_HEADS | 30 | from git_refs import R_HEADS |
31 | from wrapper import Wrapper | ||
32 | 32 | ||
33 | _SUPERPROJECT_GIT_NAME = 'superproject.git' | 33 | _SUPERPROJECT_GIT_NAME = 'superproject.git' |
34 | _SUPERPROJECT_MANIFEST_NAME = 'superproject_override.xml' | 34 | _SUPERPROJECT_MANIFEST_NAME = 'superproject_override.xml' |
@@ -273,7 +273,7 @@ class Superproject(object): | |||
273 | projects_missing_commit_ids.append(path) | 273 | projects_missing_commit_ids.append(path) |
274 | if projects_missing_commit_ids: | 274 | if projects_missing_commit_ids: |
275 | print('error: please file a bug using %s to report missing commit_ids for: %s' % | 275 | print('error: please file a bug using %s to report missing commit_ids for: %s' % |
276 | (BUG_REPORT_URL, projects_missing_commit_ids), file=sys.stderr) | 276 | (Wrapper().BUG_URL, projects_missing_commit_ids), file=sys.stderr) |
277 | return None | 277 | return None |
278 | 278 | ||
279 | manifest_path = self._WriteManfiestFile() | 279 | manifest_path = self._WriteManfiestFile() |
@@ -145,6 +145,8 @@ if not REPO_URL: | |||
145 | REPO_REV = os.environ.get('REPO_REV') | 145 | REPO_REV = os.environ.get('REPO_REV') |
146 | if not REPO_REV: | 146 | if not REPO_REV: |
147 | REPO_REV = 'stable' | 147 | REPO_REV = 'stable' |
148 | # URL to file bug reports for repo tool issues. | ||
149 | BUG_URL = 'https://bugs.chromium.org/p/gerrit/issues/entry?template=Repo+tool+issue' | ||
148 | 150 | ||
149 | # increment this whenever we make important changes to this script | 151 | # increment this whenever we make important changes to this script |
150 | VERSION = (2, 14) | 152 | VERSION = (2, 14) |
@@ -1171,6 +1173,7 @@ The most commonly used repo commands are: | |||
1171 | 1173 | ||
1172 | For access to the full online help, install repo ("repo init"). | 1174 | For access to the full online help, install repo ("repo init"). |
1173 | """) | 1175 | """) |
1176 | print('Bug reports:', BUG_URL) | ||
1174 | sys.exit(0) | 1177 | sys.exit(0) |
1175 | 1178 | ||
1176 | 1179 | ||
@@ -1204,6 +1207,7 @@ def _Version(): | |||
1204 | print('OS %s %s (%s)' % (uname.system, uname.release, uname.version)) | 1207 | print('OS %s %s (%s)' % (uname.system, uname.release, uname.version)) |
1205 | print('CPU %s (%s)' % | 1208 | print('CPU %s (%s)' % |
1206 | (uname.machine, uname.processor if uname.processor else 'unknown')) | 1209 | (uname.machine, uname.processor if uname.processor else 'unknown')) |
1210 | print('Bug reports:', BUG_URL) | ||
1207 | sys.exit(0) | 1211 | sys.exit(0) |
1208 | 1212 | ||
1209 | 1213 | ||
diff --git a/subcmds/help.py b/subcmds/help.py index 6a767e6f..0989b999 100644 --- a/subcmds/help.py +++ b/subcmds/help.py | |||
@@ -20,6 +20,7 @@ from subcmds import all_commands | |||
20 | from color import Coloring | 20 | from color import Coloring |
21 | from command import PagedCommand, MirrorSafeCommand, GitcAvailableCommand, GitcClientCommand | 21 | from command import PagedCommand, MirrorSafeCommand, GitcAvailableCommand, GitcClientCommand |
22 | import gitc_utils | 22 | import gitc_utils |
23 | from wrapper import Wrapper | ||
23 | 24 | ||
24 | 25 | ||
25 | class Help(PagedCommand, MirrorSafeCommand): | 26 | class Help(PagedCommand, MirrorSafeCommand): |
@@ -78,6 +79,7 @@ Displays detailed usage information about a command. | |||
78 | print( | 79 | print( |
79 | "See 'repo help <command>' for more information on a specific command.\n" | 80 | "See 'repo help <command>' for more information on a specific command.\n" |
80 | "See 'repo help --all' for a complete list of recognized commands.") | 81 | "See 'repo help --all' for a complete list of recognized commands.") |
82 | print('Bug reports:', Wrapper().BUG_URL) | ||
81 | 83 | ||
82 | def _PrintCommandHelp(self, cmd, header_prefix=''): | 84 | def _PrintCommandHelp(self, cmd, header_prefix=''): |
83 | class _Out(Coloring): | 85 | class _Out(Coloring): |
diff --git a/subcmds/version.py b/subcmds/version.py index e95a86dc..1d9abb58 100644 --- a/subcmds/version.py +++ b/subcmds/version.py | |||
@@ -18,6 +18,7 @@ import sys | |||
18 | from command import Command, MirrorSafeCommand | 18 | from command import Command, MirrorSafeCommand |
19 | from git_command import git, RepoSourceVersion, user_agent | 19 | from git_command import git, RepoSourceVersion, user_agent |
20 | from git_refs import HEAD | 20 | from git_refs import HEAD |
21 | from wrapper import Wrapper | ||
21 | 22 | ||
22 | 23 | ||
23 | class Version(Command, MirrorSafeCommand): | 24 | class Version(Command, MirrorSafeCommand): |
@@ -62,3 +63,4 @@ class Version(Command, MirrorSafeCommand): | |||
62 | print('OS %s %s (%s)' % (uname.system, uname.release, uname.version)) | 63 | print('OS %s %s (%s)' % (uname.system, uname.release, uname.version)) |
63 | print('CPU %s (%s)' % | 64 | print('CPU %s (%s)' % |
64 | (uname.machine, uname.processor if uname.processor else 'unknown')) | 65 | (uname.machine, uname.processor if uname.processor else 'unknown')) |
66 | print('Bug reports:', Wrapper().BUG_URL) | ||