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

Asked by Joey Stanford

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.

Question information

Language:
English Edit question
Status:
Answered
For:
Loom Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Joey Stanford (joey) said :
#1

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) said :
#2

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) said :
#3

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.

Revision history for this message
Robert Collins (lifeless) said :
#4

"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.

Revision history for this message
Robert Collins (lifeless) said :
#5

Made into a FAQ. Why the double steps? Dunno, seemed necessary.
FAQ #1191: “Looms blows up badly when the tree nick does not exist in the loom.”.

Can you help with this problem?

Provide an answer of your own, or ask Joey Stanford for more information if necessary.

To post a message you must log in.