Looms blows up badly when the tree nick does not exist in the loom.

Bug #286473 reported by Joey Stanford

This bug report was converted into a question: question #116426: Looms blows up badly when the tree nick does not exist in the loom..

2
Affects Status Importance Assigned to Milestone
Loom
Invalid
Medium
Unassigned

Bug Description

joey@c14n:~/test$ bzr -Dhpss create-thread testthread1
bzr: ERROR: exceptions.AssertionError:

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 849, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 795, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 495, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/loom/commands.py", line 118, in run
    loom.new_thread(thread, loom.nick)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/loom/branch.py", line 404, in new_thread
    assert after_thread is None or after_thread in state.get_threads_dict()
AssertionError

bzr 1.9dev on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', '-Dhpss', 'create-thread', 'testthread1']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  avahi /usr/lib/python2.5/site-packages/bzrlib/plugins/avahi [0.3.0dev0]
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.9.0]
  dbus /usr/lib/python2.5/site-packages/bzrlib/plugins/dbus [unknown]
  gnulog /home/joey/.bazaar/plugins/gnulog.py [unknown]
  gtk /usr/lib/python2.5/site-packages/bzrlib/plugins/gtk [0.95.0]
  htmllog /home/joey/.bazaar/plugins/htmllog [unknown]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  loom /usr/lib/python2.5/site-packages/bzrlib/plugins/loom [1.4.0dev0]
  lpreview /home/joey/.bazaar/plugins/lpreview [unknown]
  pqm /usr/lib/python2.5/site-packages/bzrlib/plugins/pqm [1.0.0dev0]
  stats /home/joey/.bazaar/plugins/stats [unknown]
  upload /home/joey/.bazaar/plugins/upload [0.1.1]
*** 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.

Revision history for this message
Joey Stanford (joey) wrote :

0.032 encoding stdout as sys.stdout encoding 'UTF-8'
0.034 bzr arguments: [u'create-thread', u'testthread1']
0.034 looking for plugins in /home/joey/.bazaar/plugins
0.143 looking for plugins in /usr/lib/python2.5/site-packages/bzrlib/plugins
0.144 Plugin name __init__ already loaded
0.144 Plugin name upload already loaded
0.144 Plugin name __init__ already loaded
0.144 Plugin name stats already loaded
0.182 encoding stdout as sys.stdout encoding 'UTF-8'
0.208 Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 849, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 795, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 495, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/loom/commands.py", line 118, in run
    loom.new_thread(thread, loom.nick)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/loom/branch.py", line 404, in new_thread
    assert after_thread is None or after_thread in state.get_threads_dict()
AssertionError

0.209 return code 4

0.032 encoding stdout as sys.stdout encoding 'UTF-8'
0.034 bzr arguments: [u'-Dhpss', u'create-thread', u'testthread1']
0.035 looking for plugins in /home/joey/.bazaar/plugins
0.148 looking for plugins in /usr/lib/python2.5/site-packages/bzrlib/plugins
0.149 Plugin name __init__ already loaded
0.149 Plugin name upload already loaded
0.149 Plugin name __init__ already loaded
0.149 Plugin name stats already loaded
0.186 encoding stdout as sys.stdout encoding 'UTF-8'
0.212 Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 849, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 795, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 495, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/loom/commands.py", line 118, in run
    loom.new_thread(thread, loom.nick)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/loom/branch.py", line 404, in new_thread
    assert after_thread is None or after_thread in state.get_threads_dict()
AssertionError

0.213 return code 4

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 286473] Re: assertion error when using looms

Joey, you probably ran 'bzr nick FOO', just run that again but put back
to a nick that is in your loom.

-Rob

Revision history for this message
Robert Collins (lifeless) wrote :

So there are bugs open for 'bzr nick' to be safer. But there may be branches in trouble already, and lightweight checkouts can get out of sync if the loom is changed in one checkout but not the other. So we should be resilient about this.

Changed in bzr-loom:
status: New → Invalid
summary: - assertion error when using looms
+ Looms blows up badly when the tree nick does not exist in the loom.
Changed in bzr-loom:
status: Invalid → Confirmed
importance: Undecided → Medium
Revision history for this message
Robert Collins (lifeless) wrote :

"NoSuchThread" when trying to run regular commands on a loom.

This can be caused when an older loom was used, and the 'bzr nick' command executed to set the branch nick. Because the branch nick indexes into the loom, it has to always match up, and older bzr-loom versions did not ensure that this happened.

To fix it, open up .bzr/branch/branch.conf in an editor and set the nickname to the name of one of your threads.

Changed in bzr-loom:
status: Confirmed → Invalid
Revision history for this message
Robert Collins (lifeless) wrote :

I've made this into a question as there are many different code paths to fix, and I expect few users with actively currently damaged looms.

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.