[MERGE][#120050] Give and example of --fixes in the help for the option.
James Westby
jw+debian at jameswestby.net
Wed Jul 30 17:55:33 BST 2008
On Wed, 2008-07-30 at 10:31 -0500, John Arbash Meinel wrote:
> If you look at the code, it is doing:
>
> ~ try:
> ~ bug_url = bugtracker.get_bug_url(tag, branch, bug_id)
> ~ except errors.UnknownBugTrackerAbbreviation:
> ~ raise errors.BzrCommandError(
> ~ 'Unrecognized bug %s. Commit refused.' % fixed_bug)
> ~ except errors.MalformedBugIdentifier:
> ~ raise errors.BzrCommandError(
> ~ "Invalid bug identifier for %s. Commit refused."
> ~ % fixed_bug)
>
> So it is catching your exception and re-wrapping them with a less
> helpful one.
Nice catch, I was fooled by the tests. I hadn't actually tried it,
oops.
It seems like it may be better to not do this and use the underlying
exceptions.
I guess the "Commit refused" part is wanted though to make it clear
to users that they haven't committed and need to try again.
Would something like
try:
...
except errors.MalformedBugIdentifier:
self.outf.write("Commit Refused:\n")
raise
be frowned upon.
I could just modify this in two places, but that seems
wrong.
Thanks,
James
More information about the bazaar
mailing list