dirstate error (Unknown kind 'absent') on merge/uncommit/merge sequence

Bug #336618 reported by Skyr on 2009-03-02
58
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Bazaar
High
Unassigned
Breezy
High
Unassigned

Bug Description

The noobs trigger all the bugs :-) This happend during my first efforts to use Bazaar...
I have a repository on a remote server and a local branch. I accidentially added a file which should stay out of the repository; I uncommited the unwanted modification, but during the next push, I realized that I had already pushed the operation to the server. Naturally, after a merge, the file reappeared. Since I didn't want it there, I deleted it (with bzr del). After that, the "push" still failed, and a "merge" resulted in the following error:

bzr: ERROR: exceptions.AssertionError: Unknown kind 'absent'

Traceback (most recent call last):
  File "//usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 3335, in run
    verified)
  File "//usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 3353, in _do_merge
    conflict_count = merger.do_merge()
  File "//usr/lib/python2.5/site-packages/bzrlib/merge.py", line 491, in do_merge
    self._do_merge_to(merge)
  File "//usr/lib/python2.5/site-packages/bzrlib/merge.py", line 463, in _do_merge_to
    merge.do_merge()
  File "//usr/lib/python2.5/site-packages/bzrlib/merge.py", line 602, in do_merge
    self._compute_transform()
  File "//usr/lib/python2.5/site-packages/bzrlib/merge.py", line 645, in _compute_transform
    file_status = self.merge_contents(file_id)
  File "//usr/lib/python2.5/site-packages/bzrlib/merge.py", line 1147, in merge_contents
    self.other_tree, file_id)
  File "//usr/lib/python2.5/site-packages/bzrlib/transform.py", line 2291, in create_from_tree
    raise AssertionError('Unknown kind %r' % kind)
AssertionError: Unknown kind 'absent'

bzr 1.12 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'merge', '../a']

At first, I have been working with bazaar 1.9; after encountering the bug, I upgraded to 1.12 - the bug still seems to be there.

The encloded shell script reproduces the bug.

Skyr (skyr) wrote :
Fernando Perez (fdo.perez) wrote :

Same here, with 1.13 from ubuntu...

uqbar[dev]> bzr merge ../lp
bzr: ERROR: exceptions.AssertionError: Unknown kind 'absent'

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 716, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 911, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 547, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/qbzr/lib/commands.py", line 632, in run
    return bzrlib.builtins.cmd_merge.run(self, *args, **kw)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 3443, in run
    verified)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 3461, in _do_merge
    conflict_count = merger.do_merge()
  File "/usr/lib/python2.5/site-packages/bzrlib/merge.py", line 493, in do_merge
    self._do_merge_to(merge)
  File "/usr/lib/python2.5/site-packages/bzrlib/merge.py", line 465, in _do_merge_to
    merge.do_merge()
  File "/usr/lib/python2.5/site-packages/bzrlib/merge.py", line 604, in do_merge
    self._compute_transform()
  File "/usr/lib/python2.5/site-packages/bzrlib/merge.py", line 647, in _compute_transform
    file_status = self.merge_contents(file_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/merge.py", line 1149, in merge_contents
    self.other_tree, file_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/transform.py", line 2291, in create_from_tree
    raise AssertionError('Unknown kind %r' % kind)
AssertionError: Unknown kind 'absent'

bzr 1.13 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'merge', '../lp']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  avahi /usr/lib/python2.5/site-packages/bzrlib/plugins/avahi [0.3dev]
  builddeb /usr/lib/python2.5/site-packages/bzrlib/plugins/builddeb [2.0.2]
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.13]
  dbus /usr/lib/python2.5/site-packages/bzrlib/plugins/dbus [unknown]
  email /usr/lib/python2.5/site-packages/bzrlib/plugins/email [unknown]
  gtk /usr/lib/python2.5/site-packages/bzrlib/plugins/gtk [0.95.0.final.1]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  netrc_credential_store /usr/lib/python2.5/site-packages/bzrlib/plugins/netrc_credential_store [unknown]
  pqm /usr/lib/python2.5/site-packages/bzrlib/plugins/pqm [1.0dev]
  qbzr /usr/lib/python2.5/site-packages/bzrlib/plugins/qbzr [0.9.8]
  rebase /usr/lib/python2.5/site-packages/bzrlib/plugins/rebase [0.3]
  stats /usr/lib/python2.5/site-packages/bzrlib/plugins/stats [unknown]
  svn /usr/lib/python2.5/site-packages/bzrlib/plugins/svn [0.5.3]
  upload /usr/lib/python2.5/site-packages/bzrlib/plugins/upload [0.1]

Martin Pool (mbp) on 2009-06-22
Changed in bzr:
importance: Undecided → High
status: New → Confirmed
summary: - Internal error (Unknown kind 'absent') on merge/uncommit/merge sequence
+ dirstate error (Unknown kind 'absent') on merge/uncommit/merge sequence
Robert Collins (lifeless) wrote :

We don't handle 'absent' in create_from _tree, which makes sense as long as 'tree' is always a historical tree. I suspect this is latent and reproducible. - its a tree transform bug.

description: updated
Robert Collins (lifeless) wrote :

Oh, and thank you for the shell script, thats really useful :)

tags: added: treetransform
Kapil Thangavelu (hazmat) wrote :

so i've attached another even simpler (imo) way to reproduce this bug imo. make a branch of a trunk branch or checkout. add a revision to the trunk. merge it to the branch, revert the merge, and try to merge again.

Kapil Thangavelu (hazmat) wrote :

fixed script to use naked revert.

Martin Pool (mbp) wrote :

Still present in 2.1, see bug 528164

Martin Pool (mbp) on 2011-01-21
tags: added: dirstate
Martin Pool (mbp) wrote :

bug 886741 is apparently similar, though a different traceback

Jelmer Vernooij (jelmer) on 2017-11-08
tags: added: check-for-breezy
Jelmer Vernooij (jelmer) on 2017-11-11
tags: removed: check-for-breezy
Changed in brz:
status: New → Fix Released
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers