Permalink
Browse files

Rename `CachedRepository2` to `GitCachedRepository`

  • Loading branch information...
hvr committed Oct 20, 2010
1 parent fb9a8da commit 4d8d4473694866bb24ff4c3feb215b96012e62b9
Showing with 10 additions and 3 deletions.
  1. +10 −3 tracext/git/git_fs.py
View
@@ -35,12 +35,19 @@
import PyGIT
-# for some reason CachedRepository doesn't pass-through short_rev()s or display_rev()s
-class CachedRepository2(CachedRepository):
+class GitCachedRepository(CachedRepository):
+ """
+ Git-specific cached repository
+
+ Passes through {display,short,normalize}_rev
+ """
+
def display_rev(self, rev):
return self.short_rev(rev)
+
def short_rev(self, path):
return self.repos.short_rev(path)
+
def normalize_rev(self, rev):
if not rev:
return self.repos.get_youngest_rev()
@@ -228,7 +235,7 @@ def rlookup_uid(_):
)
if self._cached_repository:
- repos = CachedRepository2(self.env, repos, self.log)
+ repos = GitCachedRepository(self.env, repos, self.log)
self.log.debug("enabled CachedRepository for '%s'" % dir)
else:
self.log.debug("disabled CachedRepository for '%s'" % dir)

0 comments on commit 4d8d447

Please sign in to comment.