Rev 4991: (Jelmer) Remove Repository.get_inventory_sha1(). in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Sun Jan 31 12:28:59 GMT 2010
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4991 [merge]
revision-id: pqm at pqm.ubuntu.com-20100131122855-lmwqnehfxn3wkm94
parent: pqm at pqm.ubuntu.com-20100129195034-tkymzp1houhuhq6f
parent: jelmer at samba.org-20100131115618-tvxyhndxi3y3k3mg
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Sun 2010-01-31 12:28:55 +0000
message:
(Jelmer) Remove Repository.get_inventory_sha1().
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/foreign.py foreign.py-20081112170002-olsxmandkk8qyfuq-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/tests/per_interrepository/test_fetch.py test_fetch.py-20080425213627-j60cjh782ufm83ry-1
bzrlib/tests/test_bundle.py test.py-20050630184834-092aa401ab9f039c
=== modified file 'NEWS'
--- a/NEWS 2010-01-29 19:50:34 +0000
+++ b/NEWS 2010-01-31 12:28:55 +0000
@@ -14,6 +14,8 @@
Compatibility Breaks
********************
+* ``Repository.get_inventory_sha1()`` has been removed. (Jelmer Vernooij)
+
New Features
************
=== modified file 'bzrlib/foreign.py'
--- a/bzrlib/foreign.py 2009-10-27 21:54:26 +0000
+++ b/bzrlib/foreign.py 2010-01-29 17:49:26 +0000
@@ -229,16 +229,6 @@
"""See Repository.get_inventory_xml()."""
return self.serialise_inventory(self.get_inventory(revision_id))
- def get_inventory_sha1(self, revision_id):
- """Get the sha1 for the XML representation of an inventory.
-
- :param revision_id: Revision id of the inventory for which to return
- the SHA1.
- :return: XML string
- """
-
- return osutils.sha_string(self.get_inventory_xml(revision_id))
-
def get_revision_xml(self, revision_id):
"""Return the XML representation of a revision.
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2010-01-15 07:00:49 +0000
+++ b/bzrlib/repository.py 2010-01-29 17:49:26 +0000
@@ -2459,12 +2459,6 @@
raise errors.HistoryMissing(self, 'inventory', revision_id)
return text
- @needs_read_lock
- def get_inventory_sha1(self, revision_id):
- """Return the sha1 hash of the inventory entry
- """
- return self.get_revision(revision_id).inventory_sha1
-
def get_rev_id_for_revno(self, revno, known_pair):
"""Return the revision id of a revno, given a later (revno, revid)
pair in the same history.
=== modified file 'bzrlib/tests/per_interrepository/test_fetch.py'
--- a/bzrlib/tests/per_interrepository/test_fetch.py 2009-10-02 02:40:37 +0000
+++ b/bzrlib/tests/per_interrepository/test_fetch.py 2010-01-31 11:56:18 +0000
@@ -515,7 +515,7 @@
from_tree.commit('foo', rev_id='foo-id')
to_repo = self.make_to_repository('to')
to_repo.fetch(from_tree.branch.repository)
- recorded_inv_sha1 = to_repo.get_inventory_sha1('foo-id')
+ recorded_inv_sha1 = to_repo.get_revision('foo-id').inventory_sha1
to_repo.lock_read()
self.addCleanup(to_repo.unlock)
stream = to_repo.inventories.get_record_stream([('foo-id',)],
=== modified file 'bzrlib/tests/test_bundle.py'
--- a/bzrlib/tests/test_bundle.py 2010-01-25 15:55:48 +0000
+++ b/bzrlib/tests/test_bundle.py 2010-01-29 17:49:26 +0000
@@ -1065,7 +1065,7 @@
def test_inv_hash_across_serializers(self):
repo = self.make_repo_with_installed_revisions()
- recorded_inv_sha1 = repo.get_inventory_sha1('rev2')
+ recorded_inv_sha1 = repo.get_revision('rev2').inventory_sha1
xml = repo.get_inventory_xml('rev2')
self.assertEqual(osutils.sha_string(xml), recorded_inv_sha1)
More information about the bazaar-commits
mailing list