Bug: commit messes up working tree
Stefan Ring
sring at gmx.net
Thu Feb 14 01:09:07 GMT 2008
I found a bug that leaves the tree in a messy unrecoverable state. When
I was bitten today on a much larger tree, bzr would throw an exception
on each subsequent "status" or "revert" (pretty much anything that
requires a working tree, I guess). Unfortunately, I cannot reproduce
this exception exactly but I have a very small testcase that shows the
original failure.
Fortunately, the repo is not damaged by this -- bzr log shows the commit
but bzr status shows a dirty state and bzr revert doesn't do anything.
Maybe I could reproduce the exception from earlier today if it would
help. I still have the commit -- id is
sring at gmx.net-20080213181510-t65qql3e7ph5g2bi, as a reminder to myself.
The two files in the test below are not empty (I don't know if that
matters). Doing a bzr rm instead of a system rm helps.
Bazaar (bzr) 1.1.0
Python interpreter: /opt/local/bin/python2.5 2.5.1.final.0
macbook:~/,checkout/bzr5 sr$ bzr log -v
------------------------------------------------------------
revno: 1
committer: Stefan Ring <s.r at visotech.at>
branch nick: bzr3
timestamp: Thu 2008-02-14 01:34:17 +0100
message:
test case
added:
a/
a/c/
a/c/x.txt
a/c/y.txt
b/
macbook:~/,checkout/bzr5 sr$ rm a/c/y.txt && bzr mv a/c b && rmdir a
a/c => b/c
macbook:~/,checkout/bzr5 sr$ bzr commit -m nasty
Committing to: /Users/sr/,checkout/bzr5/
missing a
renamed a/c => b/c
missing b/c/y.txt
deleted a
deleted a/c/y.txt
bzr: ERROR: dirstate: inconsistent delta, with tree 0. 'a/c/y.txt'
'y.txt-20080214003415-9vmtr0dp2lydsug1-5'
Digging through the log file, this is the exception that happened
immediately afterwards (on a different machine, bzr 1.1 fedora 8):
bzr arguments: [u'st']
looking for plugins in /home/sr/.bazaar/plugins
looking for plugins in /usr/lib/python2.5/site-packages/bzrlib/plugins
Plugin name __init__ already loaded
Plugin name __init__ already loaded
encoding stdout as sys.stdout encoding 'ANSI_X3.4-1968'
opening working tree '/huge/daily'
check paths: None
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 806,
in run_bzr_catch_errors
return run_bzr(argv)
File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 762,
in run_bzr
ret = run(*run_argv)
File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 492,
in run_argv_aliases
return self.run(**all_cmd_args)
File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 772,
in ignore_pipe
result = func(*args, **kwargs)
File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 189,
in run
to_file=self.outf, short=short, versioned=versioned)
File "/usr/lib/python2.5/site-packages/bzrlib/status.py", line 114,
in show_tree_status
want_unversioned=want_unversioned)
File "/usr/lib/python2.5/site-packages/bzrlib/tree.py", line 93, in
changes_from
want_unversioned=want_unversioned,
File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line
127, in read_locked
return unbound(self, *args, **kwargs)
File "/usr/lib/python2.5/site-packages/bzrlib/tree.py", line 707, in
compare
want_unversioned=want_unversioned)
File "/usr/lib/python2.5/site-packages/bzrlib/delta.py", line 217, in
_compare_trees
want_unversioned=want_unversioned):
File "/usr/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line
2360, in _iter_changes
result = _process_entry(current_entry, current_path_info)
File "/usr/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line
1954, in _process_entry
source_details = old_entry[1][source_index]
TypeError: 'NoneType' object is unsubscriptable
return code 4
More information about the bazaar
mailing list