Rev 5043: (Jelmer) Remove Repository.get_revision_inventory(). in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Wed Feb 17 16:52:43 GMT 2010
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5043 [merge]
revision-id: pqm at pqm.ubuntu.com-20100217163640-cseitbcigg7vptg7
parent: pqm at pqm.ubuntu.com-20100217152039-2isgqaajrhd8deul
parent: jelmer at samba.org-20100217155009-ok2wijesnvly49sg
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2010-02-17 16:36:40 +0000
message:
(Jelmer) Remove Repository.get_revision_inventory().
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/log.py log.py-20050505065812-c40ce11702fe5fb1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/tests/per_workingtree/test_workingtree.py test_workingtree.py-20060203003124-817757d3e31444fb
bzrlib/tests/test_commit.py test_commit.py-20050914060732-279f057f8c295434
=== modified file 'NEWS'
--- a/NEWS 2010-02-17 15:20:39 +0000
+++ b/NEWS 2010-02-17 15:50:09 +0000
@@ -18,9 +18,11 @@
``weave-plan-merge``, ``weave-merge-text``.
(Martin Pool)
-* ``Repository.get_inventory_sha1()`` has been removed. (Jelmer Vernooij)
+* ``Repository.get_inventory_sha1()`` and ``Repository.get_revision_xml()``
+ have been removed. (Jelmer Vernooij)
-* ``Repository.get_revision_xml()`` has been removed. (Jelmer Vernooij)
+* ``Repository.get_revision_inventory()`` has been removed in favor of
+ ``Repository.get_inventory()``. (Jelmer Vernooij)
* All test servers have been moved out of the bzrlib.transport hierarchy to
bzrlib.tests.test_server *except* for MemoryServer, ChrootServer and
=== modified file 'bzrlib/log.py'
--- a/bzrlib/log.py 2010-02-12 11:58:21 +0000
+++ b/bzrlib/log.py 2010-02-13 01:50:29 +0000
@@ -109,7 +109,7 @@
last_path = None
revno = 1
for revision_id in branch.revision_history():
- this_inv = branch.repository.get_revision_inventory(revision_id)
+ this_inv = branch.repository.get_inventory(revision_id)
if file_id in this_inv:
this_ie = this_inv[file_id]
this_path = this_inv.id2path(file_id)
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2010-02-17 15:20:39 +0000
+++ b/bzrlib/repository.py 2010-02-17 15:50:09 +0000
@@ -2488,22 +2488,6 @@
else:
next_id = parents[0]
- @needs_read_lock
- def get_revision_inventory(self, revision_id):
- """Return inventory of a past revision."""
- # TODO: Unify this with get_inventory()
- # bzr 0.0.6 and later imposes the constraint that the inventory_id
- # must be the same as its revision, so this is trivial.
- if revision_id is None:
- # This does not make sense: if there is no revision,
- # then it is the current tree inventory surely ?!
- # and thus get_root_id() is something that looks at the last
- # commit on the branch, and the get_root_id is an inventory check.
- raise NotImplementedError
- # return Inventory(self.get_root_id())
- else:
- return self.get_inventory(revision_id)
-
def is_shared(self):
"""Return True if this repository is flagged as a shared repository."""
raise NotImplementedError(self.is_shared)
@@ -2543,7 +2527,7 @@
return RevisionTree(self, Inventory(root_id=None),
_mod_revision.NULL_REVISION)
else:
- inv = self.get_revision_inventory(revision_id)
+ inv = self.get_inventory(revision_id)
return RevisionTree(self, inv, revision_id)
def revision_trees(self, revision_ids):
=== modified file 'bzrlib/tests/per_workingtree/test_workingtree.py'
--- a/bzrlib/tests/per_workingtree/test_workingtree.py 2010-02-10 15:39:30 +0000
+++ b/bzrlib/tests/per_workingtree/test_workingtree.py 2010-02-13 01:50:29 +0000
@@ -236,7 +236,7 @@
revid = b.revision_history()[0]
self.log('first revision_id is {%s}' % revid)
- inv = b.repository.get_revision_inventory(revid)
+ inv = b.repository.get_inventory(revid)
self.log('contents of inventory: %r' % inv.entries())
self.check_inventory_shape(inv,
=== modified file 'bzrlib/tests/test_commit.py'
--- a/bzrlib/tests/test_commit.py 2009-10-29 05:54:49 +0000
+++ b/bzrlib/tests/test_commit.py 2010-02-13 01:50:29 +0000
@@ -274,7 +274,7 @@
try:
self.check_inventory_shape(wt.read_working_inventory(),
['a/', 'a/hello', 'a/b/'])
- self.check_inventory_shape(b.repository.get_revision_inventory(r3),
+ self.check_inventory_shape(b.repository.get_inventory(r3),
['a/', 'a/hello', 'a/b/'])
finally:
wt.unlock()
@@ -289,7 +289,7 @@
finally:
wt.unlock()
- inv = b.repository.get_revision_inventory(r4)
+ inv = b.repository.get_inventory(r4)
eq(inv['hello-id'].revision, r4)
eq(inv['a-id'].revision, r1)
eq(inv['b-id'].revision, r3)
More information about the bazaar-commits
mailing list