##// END OF EJS Templates
use cs get history instead of node.history, node history have to much reference calls
marcink -
r1190:0d7a127e beta
parent child Browse files
Show More
@@ -135,8 +135,11 b' class FilesController(BaseRepoController'
135 135 #files or dirs
136 136 try:
137 137 c.files_list = c.changeset.get_node(f_path)
138 c.file_history = self._get_history(c.rhodecode_repo,
139 c.files_list, f_path)
138
139 if c.files_list.is_file():
140 c.file_history = self._get_node_history(c.changeset, f_path)
141 else:
142 c.file_history = []
140 143 except RepositoryError, e:
141 144 h.flash(str(e), category='warning')
142 145 redirect(h.url('files_home', repo_name=repo_name,
@@ -163,14 +166,11 b' class FilesController(BaseRepoController'
163 166 return file_node.content
164 167
165 168 def annotate(self, repo_name, revision, f_path):
166 cs = self.__get_cs_or_redirect(revision, repo_name)
167 c.file = self.__get_filenode_or_redirect(repo_name, cs, f_path)
169 c.cs = self.__get_cs_or_redirect(revision, repo_name)
170 c.file = self.__get_filenode_or_redirect(repo_name, c.cs, f_path)
168 171
169 c.file_history = self._get_history(c.rhodecode_repo,
170 c.file, f_path)
171 c.cs = cs
172 c.file_history = self._get_node_history(c.cs, f_path)
172 173 c.f_path = f_path
173
174 174 return render('files/files_annotate.html')
175 175
176 176 def archivefile(self, repo_name, fname):
@@ -275,10 +275,8 b' class FilesController(BaseRepoController'
275 275 c.no_changes = True
276 276 return render('files/file_diff.html')
277 277
278 def _get_history(self, repo, node, f_path):
279 if not node.is_file():
280 return []
281 changesets = node.history
278 def _get_node_history(self, cs, f_path):
279 changesets = cs.get_file_history(f_path)
282 280 hist_l = []
283 281
284 282 changesets_group = ([], _("Changesets"))
General Comments 0
You need to be logged in to leave comments. Login now