Show More
@@ -46,7 +46,7 b' from rhodecode.lib.vcs.conf import setti' | |||||
46 | from rhodecode.lib.vcs.exceptions import RepositoryError, \ |
|
46 | from rhodecode.lib.vcs.exceptions import RepositoryError, \ | |
47 | ChangesetDoesNotExistError, EmptyRepositoryError, \ |
|
47 | ChangesetDoesNotExistError, EmptyRepositoryError, \ | |
48 | ImproperArchiveTypeError, VCSError, NodeAlreadyExistsError,\ |
|
48 | ImproperArchiveTypeError, VCSError, NodeAlreadyExistsError,\ | |
49 | NodeDoesNotExistError |
|
49 | NodeDoesNotExistError, ChangesetError | |
50 | from rhodecode.lib.vcs.nodes import FileNode |
|
50 | from rhodecode.lib.vcs.nodes import FileNode | |
51 |
|
51 | |||
52 | from rhodecode.model.repo import RepoModel |
|
52 | from rhodecode.model.repo import RepoModel | |
@@ -155,14 +155,12 b' class FilesController(BaseRepoController' | |||||
155 | c.file = c.changeset.get_node(f_path) |
|
155 | c.file = c.changeset.get_node(f_path) | |
156 |
|
156 | |||
157 | if c.file.is_file(): |
|
157 | if c.file.is_file(): | |
158 | _hist = c.rhodecode_repo.get_changeset().get_file_history(f_path) |
|
158 | c.file_history, _hist = self._get_node_history(c.changeset, f_path) | |
159 | c.file_changeset = c.changeset |
|
159 | c.file_changeset = c.changeset | |
160 | if _hist: |
|
160 | if _hist: | |
161 | c.file_changeset = (c.changeset |
|
161 | c.file_changeset = (c.changeset | |
162 | if c.changeset.revision < _hist[0].revision |
|
162 | if c.changeset.revision < _hist[0].revision | |
163 | else _hist[0]) |
|
163 | else _hist[0]) | |
164 | c.file_history = self._get_node_history(c.changeset, f_path, |
|
|||
165 | _hist) |
|
|||
166 | c.authors = [] |
|
164 | c.authors = [] | |
167 | for a in set([x.author for x in _hist]): |
|
165 | for a in set([x.author for x in _hist]): | |
168 | c.authors.append((h.email(a), h.person(a))) |
|
166 | c.authors.append((h.email(a), h.person(a))) | |
@@ -519,7 +517,7 b' class FilesController(BaseRepoController' | |||||
519 | if changesets is None: |
|
517 | if changesets is None: | |
520 | try: |
|
518 | try: | |
521 | changesets = tip_cs.get_file_history(f_path) |
|
519 | changesets = tip_cs.get_file_history(f_path) | |
522 | except NodeDoesNotExistError: |
|
520 | except (NodeDoesNotExistError, ChangesetError): | |
523 | #this node is not present at tip ! |
|
521 | #this node is not present at tip ! | |
524 | changesets = cs.get_file_history(f_path) |
|
522 | changesets = cs.get_file_history(f_path) | |
525 |
|
523 | |||
@@ -544,7 +542,7 b' class FilesController(BaseRepoController' | |||||
544 | tags_group[0].append((chs, name),) |
|
542 | tags_group[0].append((chs, name),) | |
545 | hist_l.append(tags_group) |
|
543 | hist_l.append(tags_group) | |
546 |
|
544 | |||
547 | return hist_l |
|
545 | return hist_l, changesets | |
548 |
|
546 | |||
549 | @LoginRequired() |
|
547 | @LoginRequired() | |
550 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', |
|
548 | @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', |
General Comments 0
You need to be logged in to leave comments.
Login now