bzr commit on a split tree crashes

Bug #190052 reported by Wesley J. Landaker
4
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Undecided
Unassigned

Bug Description

After using 'bzr split', trying to 'bzr commit' changes in the subdir crashes.
Here is an example from a test repository I made:

$ bzr version
Bazaar (bzr) 1.1.0.candidate.1
  Python interpreter: /usr/bin/python 2.4.4.final.0
  Python standard library: /usr/lib/python2.4
  bzrlib: /usr/lib/python2.4/site-packages/bzrlib
  Bazaar configuration: /home/wjlanda/.bazaar
  Bazaar log file: /home/wjlanda/.bzr.log

Copyright 2005, 2006, 2007 Canonical Ltd.
http://bazaar-vcs.org/

bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

$ mkdir /tmp/bzr_split_crash
$ cd /tmp/bzr_split_crash/
$ bzr init --rich-root .
$ touch A B
$ mkdir subdir
$ touch subdir/A subdir/B
$ bzr add
added A
added B
added subdir
added subdir/A
added subdir/B
$ bzr commit -m "Added some files"
Committing to: /tmp/bzr_split_crash/
added A
added B
added subdir
added subdir/A
added subdir/B
Committed revision 1.
$ bzr split subdir
$ cd subdir/
$ bzr status
removed:
  A
  B
renamed:
  subdir =>
$ rm A
$ touch C
$ bzr add
added C
$ bzr commit -m "Committing in split subdir."
Committing to: /tmp/bzr_split_crash/subdir/
renamed subdir =>
missing A
added C
deleted
deleted A
deleted B
deleted subdir/A
bzr: ERROR: exceptions.TypeError: unsubscriptable object

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 806, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 762, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.4/site-packages/bzrlib/builtins.py", line 2328, in run
    author=author)
  File "/usr/lib/python2.4/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/bzrlib/workingtree_4.py", line 246, in commit
    result = WorkingTree3.commit(self, message, revprops, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/bzrlib/mutabletree.py", line 187, in commit
    revprops=revprops, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/bzrlib/commit.py", line 401, in commit
    self._basis_delta)
  File "/usr/lib/python2.4/site-packages/bzrlib/workingtree_4.py", line 1221, in update_basis_by_delta
    self.current_dirstate().update_basis_by_delta(delta, new_revid)
  File "/usr/lib/python2.4/site-packages/bzrlib/dirstate.py", line 1265, in update_basis_by_delta
    self._update_basis_apply_adds(adds)
  File "/usr/lib/python2.4/site-packages/bzrlib/dirstate.py", line 1295, in _update_basis_apply_adds
    if entry[0][2] != file_id:
TypeError: unsubscriptable object

bzr 1.1.0.candidate.1 on python 2.4.4.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'commit', '-m', 'Committing in split subdir.']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /usr/lib/python2.4/site-packages/bzrlib/plugins/bzrtools [1.1.0]
  email /usr/lib/python2.4/site-packages/bzrlib/plugins/email [unknown]
  gtk /usr/lib/python2.4/site-packages/bzrlib/plugins/gtk [0.93.0]
  launchpad /usr/lib/python2.4/site-packages/bzrlib/plugins/launchpad [unknown]
  multiparent /usr/lib/python2.4/site-packages/bzrlib/plugins/multiparent.pyc [unknown]
  rebase /usr/lib/python2.4/site-packages/bzrlib/plugins/rebase [0.3.0]
  svn /home/wjlanda/.bazaar/plugins/svn [0.4.7dev0]
*** 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
Sami Haahtinen (ressu) wrote :

I can reproduce the problem.

Changed in bzr:
status: New → Confirmed
Revision history for this message
Wesley J. Landaker (wjl) wrote :

I just tried this with bzr 1.4 and it appears to be fixed.

Changed in bzr:
status: Confirmed → Fix Released
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.