Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename CachedChangeset2 to GitCachedChangeset and whitespace cleanups

(followup to 3da8eea)
  • Loading branch information...
commit e56f7bbb870ba31dce0e6000f07aa6ce23a6da33 1 parent 8b9e904
@hvr authored
Showing with 12 additions and 5 deletions.
  1. +12 −5 tracext/git/git_fs.py
View
17 tracext/git/git_fs.py
@@ -55,16 +55,23 @@ def normalize_rev(self, rev):
if normrev is None:
raise NoSuchChangeset(rev)
return normrev
+
def get_changeset(self, rev):
- return CachedChangeset2(self, self.normalize_rev(rev), self.env)
+ return GitCachedChangeset(self, self.normalize_rev(rev), self.env)
+
+
+class GitCachedChangeset(CachedChangeset):
+ """
+ Git-specific cached changeset
-class CachedChangeset2(CachedChangeset):
+ Handles get_branches()
+ """
def get_branches(self):
_rev = self.rev
- return [ (k, v == _rev) for k, v in
- self.repos.repos.git.get_branch_contains(_rev, resolve=True) ]
-
+ return [ (k, v == _rev) for k, v in
+ self.repos.repos.git.get_branch_contains(_rev, resolve=True) ]
+
def _last_iterable(iterable):
"helper for detecting last iteration in for-loop"
Please sign in to comment.
Something went wrong with that request. Please try again.