Rev 2949: Remove dead code preserved simply because of a test suite bug. in http://people.ubuntu.com/~robertc/baz2.0/commit-builder
Robert Collins
robertc at robertcollins.net
Sat Oct 27 01:29:18 BST 2007
At http://people.ubuntu.com/~robertc/baz2.0/commit-builder
------------------------------------------------------------
revno: 2949
revision-id:robertc at robertcollins.net-20071027002911-rzmmo59xmh7gaiw8
parent: robertc at robertcollins.net-20071027000951-8i35lzu5ekoxpbob
committer: Robert Collins <robertc at robertcollins.net>
branch nick: commit-builder
timestamp: Sat 2007-10-27 10:29:11 +1000
message:
Remove dead code preserved simply because of a test suite bug.
modified:
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/tests/repository_implementations/test_commit_builder.py test_commit_builder.py-20060606110838-76e3ra5slucqus81-1
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2007-10-27 00:09:51 +0000
+++ b/bzrlib/repository.py 2007-10-27 00:29:11 +0000
@@ -253,10 +253,7 @@
self.new_inventory.add(ie)
# TODO: slow, take it out of the inner loop.
- try:
- basis_inv = parent_invs[0]
- except IndexError:
- basis_inv = Inventory(root_id=None)
+ basis_inv = parent_invs[0]
# ie.revision is always None if the InventoryEntry is considered
# for committing. We may record the previous parents revision if the
=== modified file 'bzrlib/tests/repository_implementations/test_commit_builder.py'
--- a/bzrlib/tests/repository_implementations/test_commit_builder.py 2007-10-22 01:23:51 +0000
+++ b/bzrlib/tests/repository_implementations/test_commit_builder.py 2007-10-27 00:29:11 +0000
@@ -51,7 +51,7 @@
finally:
tree.unlock()
parent_tree = tree.branch.repository.revision_tree(None)
- parent_invs = []
+ parent_invs = [parent_tree]
builder.record_entry_contents(ie, parent_invs, '', tree,
tree.path_content_summary(''))
More information about the bazaar-commits
mailing list