Broken checkout when adding a file through a symbolic link

Bug #604708 reported by John Szakmeister
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

I'm attaching a script to reproduce this issue. The short form is that I had a developer add the file to his working tree via a symbolic link in the branch. He realized he added it to the wrong place, went to revert it, and the command choked.

Here's a backtrace from 2.2b1:
Mon 2010-07-12 13:19:20 -0400
0.202 bazaar version: 2.2.0dev1
0.203 bzr arguments: [u'revert']
0.249 looking for plugins in /Users/jszakmeister/.bazaar/plugins
0.676 looking for plugins in /Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/plugins
0.720 looking for plugins in /Library/Python/2.5/site-packages/bzrlib/plugins
0.723 encoding stdout as sys.stdout encoding 'UTF-8'
0.845 opening working tree '/Users/jszakmeister/tmp/bust-bzr/inconsistent-delta'
[67067] 2010-07-12 13:19:21.329 INFO: -D b/a@
0.920 Traceback (most recent call last):
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/commands.py", line 909, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/commands.py", line 1107, in run_bzr
    ret = run(*run_argv)
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/commands.py", line 687, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/commands.py", line 702, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/cleanup.py", line 122, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/builtins.py", line 4198, in run
    self._revert_tree_to_revision(tree, revision, file_list, no_backup)
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/builtins.py", line 4204, in _revert_tree_to_revision
    report_changes=True)
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/mutabletree.py", line 49, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/workingtree.py", line 2096, in revert
    report_changes)
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/transform.py", line 2634, in revert
    tt.apply()
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/transform.py", line 1570, in apply
    self._tree.apply_inventory_delta(inventory_delta)
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/mutabletree.py", line 49, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/workingtree_4.py", line 1262, in apply_inventory_delta
    state.update_by_delta(changes)
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/dirstate.py", line 1307, in update_by_delta
    reverse=True):
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/inventory.py", line 2392, in _check_delta_unique_old_paths
    for item in delta:
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/inventory.py", line 2376, in _check_delta_unique_new_paths
    for item in delta:
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/inventory.py", line 2423, in _check_delta_ids_match_entry
    for item in delta:
  File "/Users/jszakmeister/Library/Python/2.5/site-packages/bzrlib/inventory.py", line 2411, in _check_delta_ids_are_valid
    "entry with file_id None %r" % entry)
InconsistentDelta: An inconsistent delta was supplied involving u'a/bar.txt', None
reason: entry with file_id None None

0.921 Transferred: 0kB (0.0kB/s r:0kB w:0kB)
0.921 return code 3

Revision history for this message
John Szakmeister (jszakmeister) wrote :
Revision history for this message
John A Meinel (jameinel) wrote :

Martin is currently working on the general symlink handling, and making it clear that doing "bzr add link/foo" is really meaning "bzr add target/of/link/foo". Which should fix these sorts of things.
I'm pretty sure this is a dupe of one of the ones he's working on, but I'm not positive which. For now I'm just picking one of them.

Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
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.