bzr 0.12.0: upgrade fails: 'module' object has no attribute 'workingtree'

Bug #70716 reported by Markus F.X.J. Oberhumer
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
High
John A Meinel

Bug Description

mfx@harmonia:~/tmp/test-bzr-upgrade > bzr upgrade
Format <RepositoryFormat4> for file:///home/mfx/tmp/test-bzr-upgrade/.bzr/ is deprecated - please use 'bzr upgrade' to get better performance
starting upgrade of file:///home/mfx/tmp/test-bzr-upgrade/
making backup of tree history
file:///home/mfx/tmp/test-bzr-upgrade/.bzr has been backed up to file:///home/mfx/tmp/test-bzr-upgrade/.bzr.backup
if conversion fails, you can move this directory back to .bzr
if it succeeds, you can remove this directory if you wish
starting upgrade from format 4 to 5
note: upgrade may be faster if all store files are ungzipped first
upgraded to weaves:
       2 revisions and inventories
       0 revisions not present
      38 texts
starting upgrade from format 5 to 6
adding prefixes to weaves
adding prefixes to revision-store
starting upgrade from format 6 to metadir
bzr: ERROR: exceptions.AttributeError: 'module' object has no attribute 'workingtree'

Traceback (most recent call last):
  File "/home/local/opt/cc-i386-linux/packages/bzr-0.12/bzrlib/commands.py", line 623, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/home/local/opt/cc-i386-linux/packages/bzr-0.12/bzrlib/commands.py", line 585, in run_bzr
    ret = run(*run_argv)
  File "/home/local/opt/cc-i386-linux/packages/bzr-0.12/bzrlib/commands.py", line 291, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/local/opt/cc-i386-linux/packages/bzr-0.12/bzrlib/builtins.py", line 1887, in run
    upgrade(url, format)
  File "/home/local/opt/cc-i386-linux/packages/bzr-0.12/bzrlib/upgrade.py", line 80, in upgrade
    Convert(url, format)
  File "/home/local/opt/cc-i386-linux/packages/bzr-0.12/bzrlib/upgrade.py", line 38, in __init__
    self.convert()
  File "/home/local/opt/cc-i386-linux/packages/bzr-0.12/bzrlib/upgrade.py", line 66, in convert
    self.bzrdir = converter.convert(self.bzrdir, self.pb)
  File "/home/local/opt/cc-i386-linux/packages/bzr-0.12/bzrlib/bzrdir.py", line 1873, in convert
    self.put_format(
AttributeError: 'module' object has no attribute 'workingtree'

bzr 0.12.0 on python 2.4.3.final.0 (linux2)
arguments: ['/home/mfx/local/bin/bzr', 'upgrade']

** please send this report to <email address hidden>

Revision history for this message
John A Meinel (jameinel) wrote :

This is a similar bug as bug 66349. On line 1877 of bzrlib/bzrdir.py it directly accesses bzrlib.workingtree.X but before that point it has never explicitly imported it. (It used to be imported as a side effect of other functions).

With a plugin like bzrtools installed, workingtree is imported by the plugin at startup time. So the current workaround is to just install bzrtools. The patch is pretty minor, though. I'll attach a patch.

Changed in bzr:
assignee: nobody → jameinel
importance: Undecided → High
status: Unconfirmed → Confirmed
Revision history for this message
John A Meinel (jameinel) wrote :
Revision history for this message
John A Meinel (jameinel) wrote :

Fixed in bzr-0.13. Perhaps this should be back-ported to an 0.12.1

Changed in bzr:
status: Confirmed → Fix Released
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 70716] Re: bzr 0.12.0: upgrade fails: 'module' object has no attribute 'workingtree'

On Fri, 2006-11-10 at 17:52 +0000, John A Meinel wrote:
> Fixed in bzr-0.13. Perhaps this should be back-ported to an 0.12.1

Its a regression, I think a backport is essential.

-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Revision history for this message
John A Meinel (jameinel) wrote :

Ok. I'm putting together a 0.12.1 release. I've already submitted a PQM request for a backport of the patch.

I want to finish auditing the current code to look for other potential bugs like this. (I've seen at least one place in bzrlib.add which was using a member it did not import).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.