# HG changeset patch # User Marcin Kuzminski # Date 1350733693 -7200 # Node ID c40a7185837a7e24121f5bea88d5994de5c03cb8 # Parent f53faff4487ed10558fc4311d418327ec4b7dbaf fixed issue with file history for new added files diff -r f53faff4487e -r c40a7185837a rhodecode/controllers/files.py --- 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]):