RFC: remove traceback from "newer branch format than your bzr"

Alexander Belchenko bialix at ukr.net
Tue Aug 11 06:47:49 BST 2009


Emma Jane пишет:
> This evening I tried to grab a copy of Ian's new documentation. I'm using the 
> Bazaar that comes with Ubuntu (1.13) which happens to use the old formats. I 
> was a greeted with a fairly scary message. It's at the bottom of this message.
> 
> While I appreciate the usefulness of tracebacks, I'm not sure it's entirely 
> necessary or appropriate in this case. More specifically:
> 
> 1. The first line of the error pretty much says everything I need to know:
> 	bzr: ERROR: exceptions.KeyError: 'Bazaar repository format 2a 
> 	(needs bzr 1.16 or later)\n'
> With the exception of the \n, I think this message does a pretty good job of 
> telling me what the problem is. The rest of the message (all traceback?) could 
> be omitted.
> 
> 2. At the end of the message, which is what my terminal window scrolls after 
> dumping a lot of garbage, I'm told to report a bug. I don't think it's a "bug" 
> that I'm using an old version. Perhaps a new type of error message is needed?

No, in your case (big scary traceback) it's actually bug. So if you'll file a bug about traceback on
unknown format somebody will definitely improve this part, if not already done.

> 
> 3. Generally I find tracebacks really scary. I don't do anything in Bazaar that 
> *should* generate errors (I typically work with fewer than 30 files and fewer 
> than 500 revisions per project; I rarely do merges and use BzrUpload for most 
> projects). I would prefer if the tracebacks were turned off by default with a 
> message on how to enable them, but there's no way that I can see to turn them 
> off.
> 
> 
> regards,
> emma
> 
> PS I'm now using the PPA at Robert's recommendation and it's working well. 
> Thanks!
> 
> 
> 
> 
> emmajane at hum:~/websites/bazaar-vcs.org$ bzr branch lp:bzr-alldocs
> bzr: ERROR: exceptions.KeyError: 'Bazaar repository format 2a (needs bzr 1.16 
> or later)\n'
> 
> Traceback (most recent call last):
>   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 716, in 
> exception_to_return_code
>     return the_callable(*args, **kwargs)
>   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 911, in 
> run_bzr
>     ret = run(*run_argv)
>   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 547, in 
> run_argv_aliases
>     return self.run(**all_cmd_args)
>   File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 1100, in 
> run
>     source_branch=br_from)
>   File "/usr/lib/python2.6/dist-packages/bzrlib/bzrdir.py", line 1098, in 
> sprout
>     cloning_format = self.cloning_metadir(stacked)
>   File "/usr/lib/python2.6/dist-packages/bzrlib/remote.py", line 165, in 
> cloning_metadir
>     repo_name)
>   File "/usr/lib/python2.6/dist-packages/bzrlib/registry.py", line 255, in get
>     r = Registry.get(self, format_string)
>   File "/usr/lib/python2.6/dist-packages/bzrlib/registry.py", line 168, in get
>     return self._dict[self._get_key_or_default(key)].get_obj()
> KeyError: 'Bazaar repository format 2a (needs bzr 1.16 or later)\n'
> 
> bzr 1.13.1 on python 2.6.2 (linux2)
> arguments: ['/usr/bin/bzr', 'branch', 'lp:bzr-alldocs']
> encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_CA.UTF-8'
> plugins:
>   bzrtools             /usr/lib/python2.6/dist-
> packages/bzrlib/plugins/bzrtools [1.13]
>   etckeeper            /usr/lib/python2.6/dist-
> packages/bzrlib/plugins/etckeeper [unknown]
>   launchpad            /usr/lib/python2.6/dist-
> packages/bzrlib/plugins/launchpad [unknown]
>   netrc_credential_store /usr/lib/python2.6/dist-
> packages/bzrlib/plugins/netrc_credential_store [unknown]
>   upload               /home/emmajane/.bazaar/plugins/upload [1.0dev]
> *** Bazaar has encountered an internal error.
>     Please report a bug at https://bugs.launchpad.net/bzr/+filebug
>     including this traceback, and a description of what you
>     were doing when the error occurred.
> 
> 
> 




More information about the bazaar mailing list