summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2021-04-20 23:38:04 -0400
committerMike Frysinger <vapier@google.com>2021-04-26 21:43:43 +0000
commita1cd770d566400364c43acd40b980a7138820797 (patch)
tree2147bd26a440c3129930eb4f29fb551748dc475c
parentcd89ec147ad59f19ebe16a4a30b13606102213c0 (diff)
downloadgit-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.py4
-rw-r--r--git_superproject.py4
-rwxr-xr-xrepo4
-rw-r--r--subcmds/help.py2
-rw-r--r--subcmds/version.py2
5 files changed, 10 insertions, 6 deletions
diff --git a/error.py b/error.py
index 25ff80d1..cbefcb7e 100644
--- a/error.py
+++ b/error.py
@@ -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.
17BUG_REPORT_URL = 'https://bugs.chromium.org/p/gerrit/issues/entry?template=Repo+tool+issue'
18
19
20class ManifestParseError(Exception): 16class 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
26import os 26import os
27import sys 27import sys
28 28
29from error import BUG_REPORT_URL
30from git_command import GitCommand 29from git_command import GitCommand
31from git_refs import R_HEADS 30from git_refs import R_HEADS
31from 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()
diff --git a/repo b/repo
index d9c97de1..b3f3673b 100755
--- a/repo
+++ b/repo
@@ -145,6 +145,8 @@ if not REPO_URL:
145REPO_REV = os.environ.get('REPO_REV') 145REPO_REV = os.environ.get('REPO_REV')
146if not REPO_REV: 146if not REPO_REV:
147 REPO_REV = 'stable' 147 REPO_REV = 'stable'
148# URL to file bug reports for repo tool issues.
149BUG_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
150VERSION = (2, 14) 152VERSION = (2, 14)
@@ -1171,6 +1173,7 @@ The most commonly used repo commands are:
1171 1173
1172For access to the full online help, install repo ("repo init"). 1174For 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
20from color import Coloring 20from color import Coloring
21from command import PagedCommand, MirrorSafeCommand, GitcAvailableCommand, GitcClientCommand 21from command import PagedCommand, MirrorSafeCommand, GitcAvailableCommand, GitcClientCommand
22import gitc_utils 22import gitc_utils
23from wrapper import Wrapper
23 24
24 25
25class Help(PagedCommand, MirrorSafeCommand): 26class 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
18from command import Command, MirrorSafeCommand 18from command import Command, MirrorSafeCommand
19from git_command import git, RepoSourceVersion, user_agent 19from git_command import git, RepoSourceVersion, user_agent
20from git_refs import HEAD 20from git_refs import HEAD
21from wrapper import Wrapper
21 22
22 23
23class Version(Command, MirrorSafeCommand): 24class 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)