"AssertionError: name u'COMPILING' already in parent" in _generate_inventory when running "bzr update"

Bug #377261 reported by Patrick Knight
40
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned
Breezy
Triaged
Medium
Unassigned

Bug Description

bzr: ERROR: exceptions.AssertionError: name u'COMPILING' already in parent

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 716, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 911, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 547, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 1264, in run
    view_info=view_info), possible_transports=possible_transports)
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree.py", line 2157, in update
    return self._update_tree(old_tip, change_reporter)
  File "/usr/lib/python2.6/dist-packages/bzrlib/mutabletree.py", line 52, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree.py", line 2197, in _update_tree
    change_reporter=change_reporter)
  File "/usr/lib/python2.6/dist-packages/bzrlib/merge.py", line 1520, in merge_inner
    return merger.do_merge()
  File "/usr/lib/python2.6/dist-packages/bzrlib/merge.py", line 493, in do_merge
    self._do_merge_to(merge)
  File "/usr/lib/python2.6/dist-packages/bzrlib/merge.py", line 465, in _do_merge_to
    merge.do_merge()
  File "/usr/lib/python2.6/dist-packages/bzrlib/merge.py", line 604, in do_merge
    self._compute_transform()
  File "/usr/lib/python2.6/dist-packages/bzrlib/merge.py", line 635, in _compute_transform
    entries = self._entries3()
  File "/usr/lib/python2.6/dist-packages/bzrlib/merge.py", line 685, in _entries3
    self.interesting_ids))
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/tree.py", line 203, in iter_entries_by_dir
    return self.inventory.iter_entries_by_dir(
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree_4.py", line 419, in _get_inventory
    self._generate_inventory()
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree_4.py", line 355, in _generate_inventory
    % (name_unicode,))
AssertionError: name u'COMPILING' already in parent

bzr 1.13.1 on python 2.6.2 (linux2)
arguments: ['/usr/bin/bzr', 'update']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools [1.13]
  dbus /usr/lib/python2.6/dist-packages/bzrlib/plugins/dbus [unknown]
  gtk /usr/lib/python2.6/dist-packages/bzrlib/plugins/gtk [0.96.0.dev.1]
  launchpad /usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad [unknown]
  netrc_credential_store /usr/lib/python2.6/dist-packages/bzrlib/plugins/netrc_credential_store [unknown]
*** 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.

Before this, Bazaar had told me that "working tree is out of date, run 'bzr update'. I did that and got the error message above.

Tags: dirstate
Revision history for this message
Robert Collins (lifeless) wrote :

Can you get the output of 'bzr check' and 'bzr inventory' please.

Changed in bzr:
importance: Undecided → High
Changed in bzr:
status: New → Incomplete
Revision history for this message
Patrick Knight (pknight-dev-deactivatedaccount) wrote :

Here ya go,

pknight@dellvostroa90:~/Development/SimpleUnitConverter/bzr$ bzr check
Checking working tree at 'file:///home/pknight/Development/SimpleUnitConverter/bzr/'.
Checking repository at 'file:///home/pknight/Development/SimpleUnitConverter/bzr/'.
checked repository <bzrlib.transport.local.LocalTransport url=file:///home/pknight/Development/SimpleUnitConverter/bzr/> format <RepositoryFormatKnitPack1>
     6 revisions
    42 file-ids
    35 unique file texts
    75 repeated file texts
     0 unreferenced text versions
Checking branch at 'file:///home/pknight/Development/SimpleUnitConverter/bzr/'.
checked branch file:///home/pknight/Development/SimpleUnitConverter/bzr/ format Branch format 6

pknight@dellvostroa90:~/Development/SimpleUnitConverter/bzr$ bzr inventory
0.2
0.2/CHANGELOG.txt
0.2/LICENSE.txt
0.2/SimpleUnitConverter.exe
0.2/main.c
0.2/simple_unit_converter_v0.2.zip
0.3
0.3/CHANGELOG.txt
0.3/LICENSE.txt
0.3/SimpleUnitConverter.exe
0.3/main.c
0.3/simple_unit_converter_v0.3.zip
0.4
0.4/CHANGELOG.txt
0.4/LICENSE.txt
0.4/SimpleUnitConverter.exe
0.4/main.c
0.4/simple_unit_converter_v0.4.zip
0.5
0.5/CHANGELOG.txt
0.5/LICENSE.txt
0.5/SimpleUnitConverter.exe
0.5/main.c
0.5/simple_unit_converter_v0.5.zip
0.6
0.6/CHANGELOG.txt
0.6/LICENSE.txt
0.6/SimpleUnitConverter.exe
0.6/main.c
0.6/simple_unit_converter_v0.6.zip
0.7
0.7/CHANGELOG.txt
0.7/LICENSE.txt
0.7/SimpleUnitConverter.exe
0.7/main.c
0.7/simple_unit_converter_v0.7.zip
0.7_fork1
0.7_fork1/LICENSE.txt
0.7_fork1/SimpleUnitConverter.exe
0.7_fork1/main-forked.c
0.7_fork1/simple_unit_converter_0.7_fork1
0.7_fork1/simple_unit_converter_v0.7_fork1.zip

I *think* this is the directory I was working in...

Martin Pool (mbp)
summary: - Bazaar crashed when running "bzr update"
+ "AssertionError: name u'COMPILING' already in parent" in
+ _generate_inventory when running "bzr update"
Changed in bzr:
status: Incomplete → Confirmed
Martin Pool (mbp)
tags: added: dirstate
Revision history for this message
Martin Pool (mbp) wrote :

from bug 504836

>Here is a slightly modified version of the .bzr/checkout/dirstate file:

>** Attachment added: "Attachment is dirstate with users and names changed slightly."
> http://launchpadlibrarian.net/37717669/dirstate-fordebug

Revision history for this message
Jan Pobrislo (ccx) wrote :

Happens to me too, after doing 'bzr remove --keep OUT', where OUT is directory with versioned files.
Now both 'bzr ls' and 'bzr inventory' crash with:

% bzr --no-plugins ls
bzr: ERROR: exceptions.AssertionError: name u'T15jack.hex' already in parent

Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 911, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 1111, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 689, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 704, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 1126, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/builtins.py", line 2571, in run
    from_dir=relpath, recursive=recursive):
  File "/usr/lib64/python2.7/site-packages/bzrlib/workingtree.py", line 1160, in list_files
    inv = self.inventory
  File "/usr/lib64/python2.7/site-packages/bzrlib/workingtree_4.py", line 401, in _get_inventory
    self._generate_inventory()
  File "/usr/lib64/python2.7/site-packages/bzrlib/workingtree_4.py", line 337, in _generate_inventory
    % (name_unicode,))
AssertionError: name u'T15jack.hex' already in parent

bzr 2.2.0 on python 2.7.0 (Linux-2.6.34-gentoo-r2-x86_64-AMD_Athlon-tm-_Dual_Core_Processor_5050e-with-gentoo-2.0.1)
arguments: ['/usr/bin/bzr', '--no-plugins', 'ls']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: None
plugins:

This originally happened on WinXP with Python 2.5 (current bzr suite install), I have the repository state backed up.
Attaching dirstate of the affected checkout.

Revision history for this message
Adrian Wilkins (adrian-wilkins) wrote :
Download full text (3.2 KiB)

I'm getting this when resolving conflicts.

In the case where a merged revision has added a file with the same name and moved the original out of the way. If you manually delete the new file and revert the old one back into place, then you get this error. The workaround is to revert the NEW file, which puts things back AND resolves the conflict.

# wrong way
rm V3TemplateXMLHandler.java # the new one
bzr revert V3TemplateXMLHandler.java.moved
bzr resolved V3TemplateXMLHandler.java

bzr inventory

bzr: ERROR: exceptions.AssertionError: name u'V3TemplateXMLHandler.java' already in parent

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 912, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1112, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 690, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 705, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1127, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 783, in run
    entries = tree.inventory.entries()
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree_4.py", line 401, in _get_inventory
    self._generate_inventory()
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree_4.py", line 337, in _generate_inventory
    % (name_unicode,))
AssertionError: name u'V3TemplateXMLHandler.java' already in parent

bzr 2.2.1 on python 2.6.6 (Linux-2.6.35-25-generic-x86_64-with-Ubuntu-10.10-maverick)
arguments: ['/usr/bin/bzr', 'inventory']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_GB.utf8'
plugins:
  bash_completion /usr/lib/python2.6/dist-packages/bzrlib/plugins/bash_completion [2.2.1]
  bzrtools /usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools [2.2.0]
  launchpad /usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad [2.2.1]
  netrc_credential_store /usr/lib/python2.6/dist-packages/bzrlib/plugins/netrc_credential_store [2.2.1]
  news_merge /usr/lib/python2.6/dist-packages/bzrlib/plugins/news_merge [2.2.1]
  qbzr /usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr [0.19.1]
  rewrite /usr/lib/python2.6/dist-packages/bzrlib/plugins/rewrite [0.6.1]
  svn /usr/lib/python2.6/dist-packages/bzrlib/plugins/svn [1.0.3]
  xmloutput /home/adrian/.bazaar/plugins/xmloutput [0.8.7.dev]

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.
...

Read more...

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 377261] Re: "AssertionError: name u'COMPILING' already in parent" in _generate_inventory when running "bzr update"

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2/28/2011 2:19 PM, Adrian Wilkins wrote:
> I'm getting this when resolving conflicts.
>
> In the case where a merged revision has added a file with the same name
> and moved the original out of the way. If you manually delete the new
> file and revert the old one back into place, then you get this error.
> The workaround is to revert the NEW file, which puts things back AND
> resolves the conflict.
>
> # wrong way
> rm V3TemplateXMLHandler.java # the new one
> bzr revert V3TemplateXMLHandler.java.moved
> bzr resolved V3TemplateXMLHandler.java
>
> bzr inventory
>
> bzr: ERROR: exceptions.AssertionError: name u'V3TemplateXMLHandler.java'
> already in parent

This definitely seems like a bug. Reverting the .moved file should end
up forcibly removing the old version.

Although yes, "bzr revert V3TemplateXMLHandler.java" was the intended
way to restore the old content to the original location.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1uVoQACgkQJdeBCYSNAAPIMQCfYRQeo76/j0E2KC9wso/8T/+S
tOYAnR7TmvhNXduyFBdcmPKzHe25MGRN
=cn1B
-----END PGP SIGNATURE-----

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
Changed in brz:
status: New → Triaged
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.