Assertion failure after renaming and deleting

Weeble clockworksaint+bazaar at gmail.com
Fri Jun 8 15:02:52 BST 2007


I reported what I think was the same problem earlier today, but I used
a different email address and it got postponed for moderation. I have
attempted to reproduce the bug with a minimal number of steps. Working
in Windows, the following batch file exhibits the problem:

REM ===== START OF TEST.BAT =====
setlocal
set DIR1=%1
set DIR2=%2
set FILE1=%3
set FILE2=%4

mkdir %DIR1%
echo Blah blah blah > %DIR1%\%FILE1%

bzr init
bzr add %DIR1%
bzr commit -m "Initial setup"

cd %DIR1%
bzr rename %FILE1% %FILE2%
del %FILE2%
cd ..
bzr rename %DIR1% %DIR2%

bzr status

bzr commit -m "This sometimes causes an assertion failure"
REM ===== END OF TEST.BAT =====

When I run it (in an otherwise empty directory) with:

TEST.BAT spam eggs foo bar

It produces an assertion failure.[1] However, when I run it with:

TEST.BAT foo spam bar.txt baz.txt

...it finishes with no errors. I'm hoping that's useful information to
figure out what's going on. Apologies if this is already reported.
Also note that I don't know if I'm trying to do something that's not
allowed, but I think that even if I am I should get a useful error
somewhere along the line, and not a nasty assertion failure.

Regards,
    Weeble.

[1] The assertion failure:

C:\baztest>bzr commit -m "This sometimes causes an assertion failure"
missing eggs/bar
renamed spam => eggs
deleted spam/foo
bzr: ERROR: exceptions.AssertionError: file
foo-20070608134934-jzv36hb2z6jlvee0-2 is absent in row (('spam',
'foo', 'foo-20070608134934-jzv36hb2z6jlvee0-2'), [('a', '', 0, False,
''), ('f', 'c5f067b4cfe235ef53e161ad329e15f8c9ba7b0c', 17, False,
'andrew.wilson at xxxxxxxxxxxxxx.com-20070608134934-ljt9yjqf9a7k0t4p')])
but also present at 'eggs/bar'

Traceback (most recent call last):
  File "bzrlib\commands.pyc", line 718, in run_bzr_catch_errors
  File "bzrlib\commands.pyc", line 679, in run_bzr
  File "bzrlib\commands.pyc", line 375, in run_argv_aliases
  File "bzrlib\builtins.pyc", line 2210, in run
  File "bzrlib\decorators.pyc", line 165, in write_locked
  File "bzrlib\workingtree_4.pyc", line 245, in commit
  File "bzrlib\decorators.pyc", line 165, in write_locked
  File "bzrlib\mutabletree.pyc", line 195, in commit
  File "bzrlib\commit.pyc", line 347, in commit
  File "bzrlib\mutabletree.pyc", line 38, in tree_write_locked
  File "bzrlib\workingtree_4.pyc", line 1069, in set_parent_trees
  File "bzrlib\dirstate.pyc", line 2269, in _validate
AssertionError: file foo-20070608134934-jzv36hb2z6jlvee0-2 is absent
in row (('spam', 'foo', 'foo-20070608134934-jzv36hb2z6jlvee0-2'),
[('a', '', 0, False, ''), ('f',
'c5f067b4cfe235ef53e161ad329e15f8c9ba7b0c', 17, False,
'andrew.wilson at xxxxxxxxxxxxxx.com-20070608134934-ljt9yjqf9a7k0t4p')])
but also present at 'eggs/bar'



More information about the bazaar mailing list