##// END OF EJS Templates
vcs: use proper attributes/inits on base and child classes.
marcink -
r2617:61a47f51 default
parent child Browse files
Show More
@@ -249,6 +249,20 b' class BaseRepository(object):'
249 raise NotImplementedError
249 raise NotImplementedError
250
250
251 @LazyProperty
251 @LazyProperty
252 def branches_closed(self):
253 """
254 A `dict` which maps tags names to commit ids.
255 """
256 raise NotImplementedError
257
258 @LazyProperty
259 def bookmarks(self):
260 """
261 A `dict` which maps tags names to commit ids.
262 """
263 raise NotImplementedError
264
265 @LazyProperty
252 def tags(self):
266 def tags(self):
253 """
267 """
254 A `dict` which maps tags names to commit ids.
268 A `dict` which maps tags names to commit ids.
@@ -71,8 +71,6 b' class GitRepository(BaseRepository):'
71 # caches
71 # caches
72 self._commit_ids = {}
72 self._commit_ids = {}
73
73
74 self.bookmarks = {}
75
76 @LazyProperty
74 @LazyProperty
77 def bare(self):
75 def bare(self):
78 return self._remote.bare()
76 return self._remote.bare()
@@ -323,6 +321,10 b' class GitRepository(BaseRepository):'
323 return {}
321 return {}
324
322
325 @LazyProperty
323 @LazyProperty
324 def bookmarks(self):
325 return {}
326
327 @LazyProperty
326 def branches_all(self):
328 def branches_all(self):
327 all_branches = {}
329 all_branches = {}
328 all_branches.update(self.branches)
330 all_branches.update(self.branches)
@@ -77,8 +77,6 b' class SubversionRepository(base.BaseRepo'
77
77
78 self._init_repo(create, src_url)
78 self._init_repo(create, src_url)
79
79
80 self.bookmarks = {}
81
82 def _init_repo(self, create, src_url):
80 def _init_repo(self, create, src_url):
83 if create and os.path.exists(self.path):
81 if create and os.path.exists(self.path):
84 raise RepositoryError(
82 raise RepositoryError(
@@ -107,6 +105,10 b' class SubversionRepository(base.BaseRepo'
107 return {}
105 return {}
108
106
109 @LazyProperty
107 @LazyProperty
108 def bookmarks(self):
109 return {}
110
111 @LazyProperty
110 def branches_all(self):
112 def branches_all(self):
111 # TODO: johbo: Implement proper branch support
113 # TODO: johbo: Implement proper branch support
112 all_branches = {}
114 all_branches = {}
General Comments 0
You need to be logged in to leave comments. Login now