Rev 5363: (mbp) delete deprecated RootEntry class and InventoryEntry methods (Martin in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Thu Jul 29 14:21:12 BST 2010
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5363 [merge]
revision-id: pqm at pqm.ubuntu.com-20100729132107-5kh8qzhw6e9kz5d6
parent: pqm at pqm.ubuntu.com-20100729104442-5g1m4pumcss037ic
parent: mbp at canonical.com-20100718145226-921tgdv8n7o3ynp6
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2010-07-29 14:21:07 +0100
message:
(mbp) delete deprecated RootEntry class and InventoryEntry methods (Martin
Pool)
modified:
bzrlib/inventory.py inventory.py-20050309040759-6648b84ca2005b37
=== modified file 'bzrlib/inventory.py'
--- a/bzrlib/inventory.py 2010-05-11 07:52:16 +0000
+++ b/bzrlib/inventory.py 2010-07-18 14:52:26 +0000
@@ -176,16 +176,6 @@
candidates[ie.revision] = ie
return candidates
- @deprecated_method(deprecated_in((1, 6, 0)))
- def get_tar_item(self, root, dp, now, tree):
- """Get a tarfile item and a file stream for its content."""
- item = tarfile.TarInfo(osutils.pathjoin(root, dp).encode('utf8'))
- # TODO: would be cool to actually set it to the timestamp of the
- # revision it was last changed
- item.mtime = now
- fileobj = self._put_in_tar(item, tree)
- return item, fileobj
-
def has_text(self):
"""Return true if the object this entry represents has textual data.
@@ -239,17 +229,6 @@
raise BzrError("don't know how to export {%s} of kind %r" %
(self.file_id, self.kind))
- @deprecated_method(deprecated_in((1, 6, 0)))
- def put_on_disk(self, dest, dp, tree):
- """Create a representation of self on disk in the prefix dest.
-
- This is a template method - implement _put_on_disk in subclasses.
- """
- fullpath = osutils.pathjoin(dest, dp)
- self._put_on_disk(fullpath, tree)
- # mutter(" export {%s} kind %s to %s", self.file_id,
- # self.kind, fullpath)
-
def _put_on_disk(self, fullpath, tree):
"""Put this entry onto disk at fullpath, from tree tree."""
raise BzrError("don't know how to export {%s} of kind %r" % (self.file_id, self.kind))
@@ -397,34 +376,6 @@
pass
-class RootEntry(InventoryEntry):
-
- __slots__ = ['text_sha1', 'text_size', 'file_id', 'name', 'kind',
- 'text_id', 'parent_id', 'children', 'executable',
- 'revision', 'symlink_target', 'reference_revision']
-
- def _check(self, checker, rev_id):
- """See InventoryEntry._check"""
-
- def __init__(self, file_id):
- self.file_id = file_id
- self.children = {}
- self.kind = 'directory'
- self.parent_id = None
- self.name = u''
- self.revision = None
- symbol_versioning.warn('RootEntry is deprecated as of bzr 0.10.'
- ' Please use InventoryDirectory instead.',
- DeprecationWarning, stacklevel=2)
-
- def __eq__(self, other):
- if not isinstance(other, RootEntry):
- return NotImplemented
-
- return (self.file_id == other.file_id) \
- and (self.children == other.children)
-
-
class InventoryDirectory(InventoryEntry):
"""A directory in an inventory."""
More information about the bazaar-commits
mailing list