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