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