Committing in dirstate tree with a merge and symlinks causes AssertionError

Bug #91871 reported by Matthew Paul Thomas on 2007-03-13
Affects Status Importance Assigned to Milestone
Marien Zwart

Bug Description

After merging a bundle into my tree, "bzr commit" produces an error:

bzr: ERROR: exceptions.AssertionError:

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/bzrlib/", line 650, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/", line 612, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/", line 304, in run_argv_aliases
  File "/usr/lib/python2.4/site-packages/bzrlib/", line 2109, in run
  File "/usr/lib/python2.4/site-packages/bzrlib/", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/bzrlib/", line 238, in commit
    result = WorkingTree3.commit(self, message, revprops, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/bzrlib/", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/bzrlib/", line 158, in commit
    revprops=revprops, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/bzrlib/", line 319, in commit
  File "/usr/lib/python2.4/site-packages/bzrlib/", line 656, in _populate_new_inv
    path, self.work_tree)
  File "/usr/lib/python2.4/site-packages/bzrlib/", line 1977, in record_entry_contents
  File "/usr/lib/python2.4/site-packages/bzrlib/", line 208, in find_previous_heads
    assert candidates[ie.revision] == ie

bzr 0.15.0candidate0 on python 2.4.4.candidate.1 (linux2)
arguments: ['/usr/bin/bzr', 'commit', '-m', 'my commit message was here']

Steve Alexander (stevea) wrote :

I tried merging directly from the branch in question, not using a bundle. I can reproduce this error with the same version of Bazaar, but on a newer Python: bzr 0.15.0candidate0 on python (linux2)

I have the branch available if someone at Canonical wants to debug it.

John A Meinel (jameinel) wrote :

This was reported and fixed. It is a small bug in our handling of symlinks in dirstate trees.
The fix is here:<email address hidden>%3E

Which has already been merged into and will be present in 0.15rc2

Changed in bzr:
assignee: nobody → marienz
importance: Undecided → High
status: Unconfirmed → Fix Released
Steve Alexander (stevea) wrote :

At this point, the following expressions have the following values:

InventoryLink('mailconfigurenormal.zcml-20051031024101-91557621bcfb43e3', u'mail-configure-normal.zcml', parent_id='emperor-20051030145002-920a3c2f6ab83675', <email address hidden>')


InventoryLink('mailconfigurenormal.zcml-20051031024101-91557621bcfb43e3', 'mail-configure-normal.zcml', parent_id='emperor-20051030145002-920a3c2f6ab83675', <email address hidden>')

The only visible difference is that the second value is unicode in the first output, and a plain string in the second. But, they should compare equal.

I dug deeper, and altered the code to print out the state of candidates[ie.revision] and ie at this point, using the state that is compared in InventoryLink.__eq__ (actually InventoryEntry.__eq__).

The only difference was in text_size.

candidates[ie.revision].text_size is 0
ie.text_size is None

Steve Alexander (stevea) wrote :

Applying that patch to bzrlib/ allows me to commit successfully.


To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers