Rev 62: Remove unnecessary caching. in http://people.samba.org/bzr/jelmer/bzr-git/trunk

Jelmer Vernooij jelmer at samba.org
Sat Jul 26 17:27:40 BST 2008


At http://people.samba.org/bzr/jelmer/bzr-git/trunk

------------------------------------------------------------
revno: 62
revision-id: jelmer at samba.org-20080726143603-57pdw3y5f41rj2eo
parent: jelmer at samba.org-20080726135540-sl5ooldrmzwj2uu1
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Sat 2008-07-26 16:36:03 +0200
message:
  Remove unnecessary caching.
modified:
  git_repository.py              git_repository.py-20071108234408-ygidvy5hviixghsd-2
=== modified file 'git_repository.py'
--- a/git_repository.py	2008-07-26 13:55:40 +0000
+++ b/git_repository.py	2008-07-26 14:36:03 +0000
@@ -53,7 +53,6 @@
         self.bzrdir = gitdir
         self.control_files = lockfiles
         self._git = git.repo.Repo(gitdir.root_transport.local_abspath("."))
-        self._revision_cache = {}
         self._blob_cache = {}
         self._blob_info_cache = {}
         cache_dir = cache.create_cache_dir()
@@ -114,13 +113,10 @@
         return ret
 
     def get_revision(self, revision_id):
-        if revision_id in self._revision_cache:
-            return self._revision_cache[revision_id]
         git_commit_id = ids.convert_revision_id_bzr_to_git(revision_id)
         commit = self._git.commit(git_commit_id)
         # print "fetched revision:", git_commit_id
         revision = self._parse_rev(commit)
-        self._revision_cache[revision_id] = revision
         return revision
 
     def has_revision(self, revision_id):




More information about the bazaar-commits mailing list