Rev 416: tag_cache in http://bazaar.launchpad.net/~jameinel/loggerhead/all

John Arbash Meinel john at arbash-meinel.com
Mon Apr 26 22:30:31 BST 2010


At http://bazaar.launchpad.net/~jameinel/loggerhead/all

------------------------------------------------------------
revno: 416 [merge]
revision-id: john at arbash-meinel.com-20100426212953-9uq2dan3ugx5zeye
parent: john at arbash-meinel.com-20100426212941-4oy6a03xb41vzj98
parent: john at arbash-meinel.com-20100426210347-qakfesjc3id8oowe
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: all
timestamp: Mon 2010-04-26 16:29:53 -0500
message:
  tag_cache
modified:
  loggerhead/history.py          history.py-20061211064342-102iqirsciyvgtcf-5
-------------- next part --------------
=== modified file 'loggerhead/history.py'
--- a/loggerhead/history.py	2010-04-26 21:29:41 +0000
+++ b/loggerhead/history.py	2010-04-26 21:29:53 +0000
@@ -284,6 +284,7 @@
         else:
             self._file_change_cache = None
         self._branch = branch
+        self._branch_tags = None
         self._inventory_cache = {}
         self._branch_nick = self._branch.get_config().get_nickname()
         self._show_merge_points = show_merge_points
@@ -702,11 +703,12 @@
         """
         message, short_message = clean_message(revision.message)
 
-        tags = self._branch.tags.get_reverse_tag_dict()
+        if self._branch_tags is None:
+            self._branch_tags = self._branch.tags.get_reverse_tag_dict()
 
         revtags = None
-        if tags.has_key(revision.revision_id):
-          revtags = ', '.join(tags[revision.revision_id])
+        if revision.revision_id in self._branch_tags:
+          revtags = ', '.join(self._branch_tags[revision.revision_id])
 
         entry = {
             'revid': revision.revision_id,



More information about the bazaar-commits mailing list