Rev 4799: (jam) intern() the common strings from CHKInventory deserialization. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon Nov 16 21:59:28 GMT 2009
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4799 [merge]
revision-id: pqm at pqm.ubuntu.com-20091116215927-rula71sotgtosnc4
parent: pqm at pqm.ubuntu.com-20091116211135-yrz2cqc5t8h56lve
parent: john at arbash-meinel.com-20091113191911-nokhxxx8mllrrl6x
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2009-11-16 21:59:27 +0000
message:
(jam) intern() the common strings from CHKInventory deserialization.
modified:
bzrlib/inventory.py inventory.py-20050309040759-6648b84ca2005b37
=== modified file 'bzrlib/inventory.py'
--- a/bzrlib/inventory.py 2009-10-21 21:19:41 +0000
+++ b/bzrlib/inventory.py 2009-11-13 19:19:11 +0000
@@ -1677,7 +1677,7 @@
# to filter out empty names because of non rich-root...
sections = bytes.split('\n')
kind, file_id = sections[0].split(': ')
- return (sections[2], file_id, sections[3])
+ return (sections[2], intern(file_id), intern(sections[3]))
def _bytes_to_entry(self, bytes):
"""Deserialise a serialised entry."""
@@ -1705,7 +1705,8 @@
result.reference_revision = sections[4]
else:
raise ValueError("Not a serialised entry %r" % bytes)
- result.revision = sections[3]
+ result.file_id = intern(result.file_id)
+ result.revision = intern(sections[3])
if result.parent_id == '':
result.parent_id = None
self._fileid_to_entry_cache[result.file_id] = result
More information about the bazaar-commits
mailing list