[subtrees] Wrong indentation in iter_changes unnoticed for a long time
Vincent Ladeuil
v.ladeuil+lp at free.fr
Wed Feb 18 15:13:00 GMT 2009
Some indentation has been broken long ago in
bzrlib.tree.InterTree.iter_changes:
elif from_kind == 'symlink':
if (self.source.get_symlink_target(file_id) !=
self.target.get_symlink_target(file_id)):
changed_content = True
elif from_kind == 'tree-reference':
if (self.source.get_reference_revision(file_id, from_path)
!= self.target.get_reference_revision(file_id, to_path)):
changed_content = True
oops, tree-reference handling is now dead code.
Fixing the indentation makes
bbzrlib.tests.test_merge.TestMergerEntriesLCAOnDisk.test_nested_tree_subtree_renamed_and_modified
errors out :
----------------------------------------------------------------------
Traceback (most recent call last):
File "/net/bigmamac/Volumes/home/vila/src/bzr/bugs/iter-changes-tree-ref/bzrlib/tests/test_merge.py", line 2638, in test_nested_tree_subtree_renamed_and_modified
wt.revert()
File "/net/bigmamac/Volumes/home/vila/src/bzr/bugs/iter-changes-tree-ref/bzrlib/mutabletree.py", line 52, in tree_write_locked
return unbound(self, *args, **kwargs)
File "/net/bigmamac/Volumes/home/vila/src/bzr/bugs/iter-changes-tree-ref/bzrlib/workingtree.py", line 1999, in revert
report_changes)
File "/net/bigmamac/Volumes/home/vila/src/bzr/bugs/iter-changes-tree-ref/bzrlib/transform.py", line 2363, in revert
tt.finalize()
File "/net/bigmamac/Volumes/home/vila/src/bzr/bugs/iter-changes-tree-ref/bzrlib/transform.py", line 180, in finalize
raise errors.ImmortalPendingDeletion(self._deletiondir)
ImmortalPendingDeletion: Unable to delete transform temporary directory /tmp/testbzr-JVifjS.tmp/bzrlib.tests.test_merge.TestMergerEntriesLCAOnDisk.test_nested_tree_subtree_renamed_and_modified/work/tree/.bzr/checkout/pending-deletion. Please examine /tmp/testbzr-JVifjS.tmp/bzrlib.tests.test_merge.TestMergerEntriesLCAOnDisk.test_nested_tree_subtree_renamed_and_modified/work/tree/.bzr/checkout/pending-deletion to see if it contains any files you wish to keep, and delete it when you are done.
So it seems that there are other bugs related to subtrees waiting
to be fixed.
I thought subtrees hackers may be interested about that one as
they ought to run into it sooner rather than later.
Hope this helps,
Vincent
More information about the bazaar
mailing list