loom needs to hook into 'bzr nick' to make that rename the thread -or- refuse to change.

Bug #260947 reported by Sebastian Kuzminsky on 2008-08-24
2
Affects Status Importance Assigned to Milestone
Loom
Medium
Robert Collins

Bug Description

0 seb@water /home/seb/emc2/module-interface> bzr show-loom
  module-interface
=>upstream
0 seb@water /home/seb/emc2/module-interface> bzr up-thread
All changes applied successfully.
Moved to thread 'module-interface'.
0 seb@water /home/seb/emc2/module-interface> bzr nick
module-interface
0 seb@water /home/seb/emc2/module-interface> bzr nick minor-fixes
bzr: ERROR: exceptions.KeyError: u'minor-fixes'

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 846, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 2536, in run
    branch.nick = nickname
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 139, in _set_nick
    self.get_config().set_user_option('nickname', nick, warn_masked=True)
  File "/usr/lib/python2.5/site-packages/bzrlib/config.py", line 675, in set_user_option
    self._get_branch_data_config().set_option(value, name)
  File "/usr/lib/python2.5/site-packages/bzrlib/config.py", line 921, in set_option
    self.branch.unlock()
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/loom/branch.py", line 687, in unlock
    if dict(state.get_threads_dict())[self.nick][0] != lastrev:
KeyError: u'minor-fixes'

bzr 1.5 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'nick', 'minor-fixes']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.5.0]
  dbus /usr/lib/python2.5/site-packages/bzrlib/plugins/dbus [unknown]
  gtk /usr/lib/python2.5/site-packages/bzrlib/plugins/gtk [0.94.0]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  loom /usr/lib/python2.5/site-packages/bzrlib/plugins/loom [1.4.0dev0]
  qbzr /usr/lib/python2.5/site-packages/bzrlib/plugins/qbzr [0.9.2]
  rebase /usr/lib/python2.5/site-packages/bzrlib/plugins/rebase [0.3.0]
  svn /usr/lib/python2.5/site-packages/bzrlib/plugins/svn [0.4.10]
*** 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.

Related branches

Download full text (3.4 KiB)

After the above command resulted in an internal error, the nick was changed, and the branch was left locked with no thread selected:

4 seb@water /home/seb/emc2/module-interface> bzr nick
minor-fixes
0 seb@water /home/seb/emc2/module-interface> bzr show-loom
  module-interface
  upstream
0 seb@water /home/seb/emc2/module-interface> bzr up-thread
Unable to obtain lock file:///home/seb/emc2/module-interface/.bzr/repository/lock
held by <email address hidden> on host water [process #17677]
locked 5 minutes, 9 seconds ago
Will continue to try until 14:50:13

^Cbzr: interrupted

I broke the lock, but the branch seems sort of horked now:

3 seb@water /home/seb/emc2/module-interface> bzr break-lock
Break lock file:///home/seb/emc2/module-interface/.bzr/branch/lock
held by <email address hidden> on host water [process #17677]
locked 5 minutes, 19 seconds ago? [y/n]: y
Break lock file:///home/seb/emc2/module-interface/.bzr/repository/lock
held by <email address hidden> on host water [process #17677]
locked 5 minutes, 21 seconds ago? [y/n]: y
0 seb@water /home/seb/emc2/module-interface> bzr nick
minor-fixes
0 seb@water /home/seb/emc2/module-interface> bzr show-loom
  module-interface
  upstream
0 seb@water /home/seb/emc2/module-interface> bzr down-thread
bzr: ERROR: exceptions.KeyError: u'minor-fixes'

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 846, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/loom/commands.py", line 274, in run
    return tree.down_thread(thread)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 167, in write_locked
    self.unlock()
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/loom/tree.py", line 231, in unlock
    self.tree.unlock()
  File "/usr/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line 1146, in unlock
    self.branch.unlock()
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/loom/branch.py", line 687, in unlock
    if dict(state.get_threads_dict())[self.nick][0] != lastrev:
KeyError: u'minor-fixes'

bzr 1.5 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'down-thread']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.5.0]
  dbus /usr/lib/python2.5/site-packages/bzrlib/plugins/dbus [unknown]
  gtk /usr/lib/python2.5/site-packages/bzrlib/plugins/gtk [0.94.0]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  loom /usr/lib/python2.5/site-packages/bzrlib/plugins/loom [1.4.0dev0]
  qbzr /usr/lib/python2.5/site-packages/bzrlib/plugins/qbzr [0.9.2]
  rebase /usr/lib/python2.5/site-packages/bzrlib/plugins/rebase [0.3.0]
  svn /usr/lib/python2.5/site-packages/bzrlib/plugins/svn [0.4.10]
*** Bazaar has encountered an ...

Read more...

The nick command is not integrated into loom yet; just set the nick back
to the previous thread and then resume using loom.

note that changing threads in a loom will change your nick for you.

-Rob

summary: - "internal error" when changing nick in a loom thread
+ loom needs to hook into 'bzr nick' to make that rename the thread -or-
+ refuse to change.
Changed in bzr-loom:
status: New → Confirmed
importance: Undecided → Medium
Changed in bzr-loom:
status: Confirmed → Fix Released
assignee: nobody → Robert Collins (lifeless)
milestone: none → 2.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers