Show More
@@ -50,7 +50,7 b' class FilesController(BaseController):' | |||||
50 |
|
50 | |||
51 | def index(self, repo_name, revision, f_path): |
|
51 | def index(self, repo_name, revision, f_path): | |
52 | hg_model = HgModel() |
|
52 | hg_model = HgModel() | |
53 |
c. |
|
53 | c.repo = hg_model.get_repo(c.repo_name) | |
54 | revision = request.POST.get('at_rev', None) or revision |
|
54 | revision = request.POST.get('at_rev', None) or revision | |
55 |
|
55 | |||
56 | def get_next_rev(cur): |
|
56 | def get_next_rev(cur): | |
@@ -68,10 +68,10 b' class FilesController(BaseController):' | |||||
68 |
|
68 | |||
69 |
|
69 | |||
70 | try: |
|
70 | try: | |
71 | c.changeset = repo.get_changeset(revision) |
|
71 | c.changeset = c.repo.get_changeset(revision) | |
72 | cur_rev = c.changeset.revision |
|
72 | cur_rev = c.changeset.revision | |
73 | prev_rev = repo.get_changeset(get_prev_rev(cur_rev)).raw_id |
|
73 | prev_rev = c.repo.get_changeset(get_prev_rev(cur_rev)).raw_id | |
74 | next_rev = repo.get_changeset(get_next_rev(cur_rev)).raw_id |
|
74 | next_rev = c.repo.get_changeset(get_next_rev(cur_rev)).raw_id | |
75 |
|
75 | |||
76 | c.url_prev = url('files_home', repo_name=c.repo_name, |
|
76 | c.url_prev = url('files_home', repo_name=c.repo_name, | |
77 | revision=prev_rev, f_path=f_path) |
|
77 | revision=prev_rev, f_path=f_path) | |
@@ -80,7 +80,7 b' class FilesController(BaseController):' | |||||
80 |
|
80 | |||
81 | try: |
|
81 | try: | |
82 | c.files_list = c.changeset.get_node(f_path) |
|
82 | c.files_list = c.changeset.get_node(f_path) | |
83 | c.file_history = self._get_history(repo, c.files_list, f_path) |
|
83 | c.file_history = self._get_history(c.repo, c.files_list, f_path) | |
84 |
|
84 | |||
85 | except RepositoryError, e: |
|
85 | except RepositoryError, e: | |
86 | h.flash(str(e), category='warning') |
|
86 | h.flash(str(e), category='warning') | |
@@ -114,11 +114,10 b' class FilesController(BaseController):' | |||||
114 | def annotate(self, repo_name, revision, f_path): |
|
114 | def annotate(self, repo_name, revision, f_path): | |
115 | hg_model = HgModel() |
|
115 | hg_model = HgModel() | |
116 | c.repo = hg_model.get_repo(c.repo_name) |
|
116 | c.repo = hg_model.get_repo(c.repo_name) | |
117 | cs = c.repo.get_changeset(revision) |
|
117 | c.cs = c.repo.get_changeset(revision) | |
118 | c.file = cs.get_node(f_path) |
|
118 | c.file = c.cs.get_node(f_path) | |
119 |
c.file_ |
|
119 | c.file_history = self._get_history(c.repo, c.file, f_path) | |
120 | c.cur_rev = cs.raw_id |
|
120 | ||
121 | c.rev_nr = cs.revision |
|
|||
122 | c.f_path = f_path |
|
121 | c.f_path = f_path | |
123 |
|
122 | |||
124 | return render('files/files_annotate.html') |
|
123 | return render('files/files_annotate.html') |
@@ -88,7 +88,9 b' def get_hg_ui_settings():' | |||||
88 | def whoosh_index(repo_location, full_index): |
|
88 | def whoosh_index(repo_location, full_index): | |
89 | log = whoosh_index.get_logger() |
|
89 | log = whoosh_index.get_logger() | |
90 | from rhodecode.lib.indexers.daemon import WhooshIndexingDaemon |
|
90 | from rhodecode.lib.indexers.daemon import WhooshIndexingDaemon | |
91 | WhooshIndexingDaemon(repo_location=repo_location).run(full_index=full_index) |
|
91 | index_location = '' | |
|
92 | WhooshIndexingDaemon(index_location=index_location, | |||
|
93 | repo_location=repo_location).run(full_index=full_index) | |||
92 |
|
94 | |||
93 | @task |
|
95 | @task | |
94 | @locked_task |
|
96 | @locked_task |
@@ -271,8 +271,8 b' def pygmentize_annotation(filenode, **kw' | |||||
271 | tooltip_html = tooltip_html % (changeset.author, |
|
271 | tooltip_html = tooltip_html % (changeset.author, | |
272 | changeset.date, |
|
272 | changeset.date, | |
273 | tooltip(changeset.message)) |
|
273 | tooltip(changeset.message)) | |
274 |
lnk_format = ' |
|
274 | lnk_format = '%5s:%s' % ('r%s' % changeset.revision, | |
275 | changeset.raw_id) |
|
275 | short_id(changeset.raw_id)) | |
276 | uri = link_to( |
|
276 | uri = link_to( | |
277 | lnk_format, |
|
277 | lnk_format, | |
278 | url('changeset_home', repo_name=changeset.repository.name, |
|
278 | url('changeset_home', repo_name=changeset.repository.name, |
@@ -61,10 +61,6 b' ch.setFormatter(formatter)' | |||||
61 | # add ch to logger |
|
61 | # add ch to logger | |
62 | log.addHandler(ch) |
|
62 | log.addHandler(ch) | |
63 |
|
63 | |||
64 | def get_repos_location(): |
|
|||
65 | return HgModel.get_repos_location() |
|
|||
66 |
|
||||
67 |
|
||||
68 | class WhooshIndexingDaemon(object): |
|
64 | class WhooshIndexingDaemon(object): | |
69 | """ |
|
65 | """ | |
70 | Deamon for atomic jobs |
|
66 | Deamon for atomic jobs |
General Comments 0
You need to be logged in to leave comments.
Login now