Rev 2403: Add a test which exposes the bug in WT4._iter_changes() in http://bzr.arbash-meinel.com/branches/bzr/0.16-dev/iter_changes_unknowns_104257
John Arbash Meinel
john at arbash-meinel.com
Wed Apr 11 18:02:57 BST 2007
At http://bzr.arbash-meinel.com/branches/bzr/0.16-dev/iter_changes_unknowns_104257
------------------------------------------------------------
revno: 2403
revision-id: john at arbash-meinel.com-20070411170244-qael9owa2l2rcneh
parent: pqm at pqm.ubuntu.com-20070410074302-cf6b95587a1058cd
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: iter_changes_unknowns_104257
timestamp: Wed 2007-04-11 12:02:44 -0500
message:
Add a test which exposes the bug in WT4._iter_changes()
modified:
bzrlib/tests/intertree_implementations/test_compare.py test_compare.py-20060724101752-09ysswo1a92uqyoz-2
-------------- next part --------------
=== modified file 'bzrlib/tests/intertree_implementations/test_compare.py'
--- a/bzrlib/tests/intertree_implementations/test_compare.py 2007-03-21 04:14:35 +0000
+++ b/bzrlib/tests/intertree_implementations/test_compare.py 2007-04-11 17:02:44 +0000
@@ -1211,3 +1211,29 @@
self.assertEqual([], # Without want_unversioned we should get nothing
self.do_iter_changes(tree1, tree2,
specific_files=[u'\u03b1']))
+
+ def test_unknown_empty_dir(self):
+ tree1 = self.make_branch_and_tree('tree1')
+ tree2 = self.make_to_branch_and_tree('tree2')
+ root_id = tree1.get_root_id()
+ tree2.set_root_id(root_id)
+
+ # Create an empty directory 'a', followed by a directory with content
+ # 'b'.
+ self.build_tree(['tree1/a/', 'tree1/b/', 'tree1/b/file'])
+ self.build_tree(['tree2/a/', 'tree2/a/file', 'tree2/b/', 'tree2/b/file'])
+ tree1.add(['a', 'b', 'b/file'], ['a-id', 'b-id', 'b-file-id'])
+ tree2.add(['a', 'b', 'b/file'], ['a-id', 'b-id', 'b-file-id'])
+
+ tree1, tree2 = self.mutable_trees_to_locked_test_trees(tree1, tree2)
+
+ expected = sorted([
+ self.unversioned(tree2, u'a/file'),
+ # This isn't strictly important, but it is easier to let it happen,
+ # than to work around it.
+ self.content_changed(tree2, 'b-file-id'),
+ ])
+ self.assertEqual(expected,
+ self.do_iter_changes(tree1, tree2,
+ require_versioned=False,
+ want_unversioned=True))
More information about the bazaar-commits
mailing list