Mercurial > kallithea
changeset 2943:c40a7185837a beta
fixed issue with file history for new added files
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 20 Oct 2012 13:48:13 +0200 |
parents | f53faff4487e |
children | 0add173667b6 |
files | rhodecode/controllers/files.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/controllers/files.py Fri Oct 19 23:44:35 2012 +0200 +++ b/rhodecode/controllers/files.py Sat Oct 20 13:48:13 2012 +0200 @@ -155,7 +155,11 @@ if c.file.is_file(): _hist = c.rhodecode_repo.get_changeset().get_file_history(f_path) - c.file_changeset = c.changeset if c.changeset.revision < _hist[0].revision else _hist[0] + c.file_changeset = c.changeset + if _hist: + c.file_changeset = (c.changeset + if c.changeset.revision < _hist[0].revision + else _hist[0]) c.file_history = self._get_node_history(None, f_path, _hist) c.authors = [] for a in set([x.author for x in _hist]):