From 0a0ec1c955da2e52f1be0f428a0bf6983308c063 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Tue, 24 Feb 2015 13:06:18 -0500 Subject: Add a useful help string when the version is unknown https://bugzilla.gnome.org/show_bug.cgi?id=673828 --- git-bz | 8 ++++++++ 1 file changed, 8 insertions(+) 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 " % self.server.host + sys.exit(1) + die(e.faultString) except xmlrpclib.ProtocolError, e: if e.errcode == 404: -- cgit