removing a subtree with conflicts causes a traceback

Bug #271692 reported by ToniMueller
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Low
Unassigned

Bug Description

I have two trees which I wanted to merge (long ago, I forgot the
details), which I now wanted to clean up, and I remember that the
merge produced some conflicts. This is a website, and things have
been shuffled around a bit. First, I review the current tree's status:

$ bzr st
removed:
  Info/images/SkizZent1.gif
  cgi/kvhs/
  ... some more
added:
  doc/
  doc/Info/Downloads.html
renamed:
  Cert => doc/Cert
  FSA => doc/FSA
  Fortbildung => doc/Fortbildung
  Impressum.html => doc/Impressum.html
  Info => doc/Info
  ...some more
modified:
  doc/Info/Weg.html
  ...
  doc/kvhstm.css
unknown:
  cgi/danke.pl
  ... some more
conflicts:
  Conflict adding files to cgi/kvhs. Created directory. <--- This directory is not there!
  Contents conflict in cgi/kvhs/danke.pl
  Conflict adding files to cgi/kvhs/dat. Created directory. <--- And this isn't there, too.
  Contents conflict in cgi/kvhs/dat/F1.templ
  Contents conflict in cgi/kvhs/dat/F1b.templ
  ... some more

After reading this, I realized that I no longer have "cgi/kvhs" (see the top of
the listing), and decided to

$ bzr rm --keep cgi/kvhs
removed cgi/kvhs

because I thought I'd "resolve" a lot of bogus conflicts that way.

Unfortunately, I now get this result when trying to view my
tree's status:

$ bzr st
bzr: ERROR: exceptions.AssertionError: Could not find target parent in wt: cgi/kvhs
parent of: (('cgi/kvhs', 'DBConf.pm', 'dbconf.pm-20071220231833-p7vw5fd46erk7559-1'), [('f', 'a7db3dc5f016c8ffc69f8c317ef45917b0ab0905', 1035L, 0, 'AAAEC0f8heJH/IXiAAD9CQCJCV0AAIGk'), ('f', 'a7db3dc5f016c8ffc69f8c317ef45917b0ab0905', 1035L, 0, '<email address hidden>')])

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 846, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 807, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/python2.4/site-packages/bzrlib/builtins.py", line 178, in run
    show_pending=not no_pending)
  File "/usr/lib/python2.4/site-packages/bzrlib/status.py", line 117, in show_tree_status
    want_unversioned=want_unversioned)
  File "/usr/lib/python2.4/site-packages/bzrlib/tree.py", line 93, in changes_from
    want_unversioned=want_unversioned,
  File "/usr/lib/python2.4/site-packages/bzrlib/decorators.py", line 127, in read_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/bzrlib/tree.py", line 734, in compare
    want_unversioned=want_unversioned)
  File "/usr/lib/python2.4/site-packages/bzrlib/delta.py", line 217, in _compare_trees
    want_unversioned=want_unversioned):
  File "/usr/lib/python2.4/site-packages/bzrlib/workingtree_4.py", line 2346, in iter_changes
    result = _process_entry(current_entry, None)
  File "/usr/lib/python2.4/site-packages/bzrlib/workingtree_4.py", line 2087, in _process_entry
    raise AssertionError(
AssertionError: Could not find target parent in wt: cgi/kvhs
parent of: (('cgi/kvhs', 'DBConf.pm', 'dbconf.pm-20071220231833-p7vw5fd46erk7559-1'), [('f', 'a7db3dc5f016c8ffc69f8c317ef45917b0ab0905', 1035L, 0, 'AAAEC0f8heJH/IXiAAD9CQCJCV0AAIGk'), ('f', 'a7db3dc5f016c8ffc69f8c317ef45917b0ab0905', 1035L, 0, '<email address hidden>')])

bzr 1.5 on python 2.4.4 (linux2)
arguments: ['/usr/bin/bzr', 'st']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'de_DE.utf8'
plugins:
  bzrtools /usr/lib/python2.4/site-packages/bzrlib/plugins/bzrtools [1.5.0]
  launchpad /usr/lib/python2.4/site-packages/bzrlib/plugins/launchpad [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.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 271692] [NEW] removing a subtree with conflicts causes a traceback

I believe the assertion error is fixed in 1.6 and above; you may need to
recreate your tree (do a remove-tree and then a 'checkout .') though,
because 1.5 writes bad data to the dirstate.

-Rob

Revision history for this message
ToniMueller (support-oeko) wrote :

Hi,

On Thu, 18.09.2008 at 10:30:22 -0000, Robert Collins <email address hidden> wrote:
> I believe the assertion error is fixed in 1.6 and above; you may need to
> recreate your tree (do a remove-tree and then a 'checkout .') though,
> because 1.5 writes bad data to the dirstate.

thanks for suggesting that.

I did as you suggested with 1.6.1, and the traceback problem went away.

Kind regards,
--Toni++

Vincent Ladeuil (vila)
Changed in bzr:
importance: Undecided → Low
milestone: none → 1.6.1
status: New → 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.