diff --git a/rhodecode/lib/vcs/backends/base.py b/rhodecode/lib/vcs/backends/base.py index 47b7a74c..f37a9698 100644 --- a/rhodecode/lib/vcs/backends/base.py +++ b/rhodecode/lib/vcs/backends/base.py @@ -248,6 +248,20 @@ class BaseRepository(object): """ raise NotImplementedError + @LazyProperty + def branches_closed(self): + """ + A `dict` which maps tags names to commit ids. + """ + raise NotImplementedError + + @LazyProperty + def bookmarks(self): + """ + A `dict` which maps tags names to commit ids. + """ + raise NotImplementedError + @LazyProperty def tags(self): """ diff --git a/rhodecode/lib/vcs/backends/git/repository.py b/rhodecode/lib/vcs/backends/git/repository.py index 62e46540..4b6094e7 100644 --- a/rhodecode/lib/vcs/backends/git/repository.py +++ b/rhodecode/lib/vcs/backends/git/repository.py @@ -71,8 +71,6 @@ class GitRepository(BaseRepository): # caches self._commit_ids = {} - self.bookmarks = {} - @LazyProperty def bare(self): return self._remote.bare() @@ -322,6 +320,10 @@ class GitRepository(BaseRepository): def branches_closed(self): return {} + @LazyProperty + def bookmarks(self): + return {} + @LazyProperty def branches_all(self): all_branches = {} diff --git a/rhodecode/lib/vcs/backends/svn/repository.py b/rhodecode/lib/vcs/backends/svn/repository.py index 23acce5e..b84d8f5d 100644 --- a/rhodecode/lib/vcs/backends/svn/repository.py +++ b/rhodecode/lib/vcs/backends/svn/repository.py @@ -77,8 +77,6 @@ class SubversionRepository(base.BaseRepository): self._init_repo(create, src_url) - self.bookmarks = {} - def _init_repo(self, create, src_url): if create and os.path.exists(self.path): raise RepositoryError( @@ -106,6 +104,10 @@ class SubversionRepository(base.BaseRepository): def branches_closed(self): return {} + @LazyProperty + def bookmarks(self): + return {} + @LazyProperty def branches_all(self): # TODO: johbo: Implement proper branch support