Changeset - f3b913b76be1
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-10-17 20:32:25
marcin@python-works.com
Calculate file history always from latest changeset to always show full history.
When doing the calculation from a particular changeset git doesn't any records from parent changesets
1 file changed with 6 insertions and 3 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/files.py
Show inline comments
 
@@ -153,9 +153,8 @@ class FilesController(BaseRepoController
 
            c.file = c.changeset.get_node(f_path)
 

	
 
            if c.file.is_file():
 
                _hist = c.changeset.get_file_history(f_path)
 
                c.file_history = self._get_node_history(c.changeset, f_path,
 
                                                        _hist)
 
                _hist = c.rhodecode_repo.get_changeset().get_file_history(f_path)
 
                c.file_history = self._get_node_history(None, f_path, _hist)
 
                c.authors = []
 
                for a in set([x.author for x in _hist]):
 
                    c.authors.append((h.email(a), h.person(a)))
 
@@ -487,8 +486,12 @@ class FilesController(BaseRepoController
 
        return render('files/file_diff.html')
 

	
 
    def _get_node_history(self, cs, f_path, changesets=None):
 
        if cs is None:
 
            # if we pass empty CS calculate history based on tip
 
            cs = c.rhodecode_repo.get_changeset()
 
        if changesets is None:
 
            changesets = cs.get_file_history(f_path)
 

	
 
        hist_l = []
 

	
 
        changesets_group = ([], _("Changesets"))
0 comments (0 inline, 0 general)