summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2015-02-24 13:06:18 -0500
committerOwen W. Taylor <otaylor@fishsoup.net>2015-02-24 13:06:55 -0500
commit0a0ec1c955da2e52f1be0f428a0bf6983308c063 (patch)
tree360cda39802d6b5bf567e58ae10afb849d8cced4
parentb658f6b70a6adc5e26349773e50045ab4c7236c2 (diff)
downloadgit-bz-0a0ec1c955da2e52f1be0f428a0bf6983308c063.tar.gz
Add a useful help string when the version is unknown
https://bugzilla.gnome.org/show_bug.cgi?id=673828
-rwxr-xr-xgit-bz8
1 files changed, 8 insertions, 0 deletions
diff --git a/git-bz b/git-bz
index 821cf2f..5314b36 100755
--- a/git-bz
+++ b/git-bz
@@ -1192,6 +1192,14 @@ class Bug(object):
response = self.server.get_xmlrpc_proxy().Bug.create(params)
self.id = response['id']
except xmlrpclib.Fault, e:
+ if e.faultString.find("is no version named '") > 0:
+ print >>sys.stderr, e.faultString
+ print >>sys.stderr
+ print >>sys.stderr, "You can configure a version for %s with:" % self.server.host
+ print >>sys.stderr
+ print >>sys.stderr, " git config [--global] bz-tracker.%s.default-version <version>" % self.server.host
+ sys.exit(1)
+
die(e.faultString)
except xmlrpclib.ProtocolError, e:
if e.errcode == 404: