##// END OF EJS Templates
fixed files when repository is empty
marcink -
r138:5f42d751 default
parent child Browse files
Show More
@@ -8,6 +8,7 b' from pylons_app.lib.utils import get_rep'
8 8 from pylons_app.model.hg_model import HgModel
9 9 from difflib import unified_diff
10 10 from pylons_app.lib.differ import render_udiff
11 from vcs.exceptions import RepositoryError
11 12
12 13 log = logging.getLogger(__name__)
13 14
@@ -21,11 +22,13 b' class FilesController(BaseController):'
21 22 c.repo = repo = hg_model.get_repo(c.repo_name)
22 23 c.cur_rev = revision
23 24 c.f_path = f_path
24 c.changeset = repo.get_changeset(repo._get_revision(revision))
25 try:
26 c.changeset = repo.get_changeset(repo._get_revision(revision))
27 c.files_list = c.changeset.get_node(f_path)
28 c.file_history = self._get_history(repo, c.files_list, f_path)
29 except RepositoryError:
30 c.files_list = None
25 31
26 c.files_list = c.changeset.get_node(f_path)
27
28 c.file_history = self._get_history(repo, c.files_list, f_path)
29 32 return render('files/files.html')
30 33
31 34 def diff(self, repo_name, f_path):
General Comments 0
You need to be logged in to leave comments. Login now