changeset 1681:1bf03daafaf0 beta

fixes inline comments double entries
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 13 Nov 2011 18:19:31 +0200
parents cf370b6d3977
children 1f2ba96de73e
files rhodecode/model/comment.py rhodecode/templates/changeset/changeset.html
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/model/comment.py	Sun Nov 13 18:05:44 2011 +0200
+++ b/rhodecode/model/comment.py	Sun Nov 13 18:19:31 2011 +0200
@@ -84,7 +84,9 @@
     def get_inline_comments(self, repo_id, revision):
         comments = self.sa.query(ChangesetComment)\
             .filter(ChangesetComment.repo_id == repo_id)\
-            .filter(ChangesetComment.revision == revision).all()
+            .filter(ChangesetComment.revision == revision)\
+            .filter(ChangesetComment.line_no != None)\
+            .filter(ChangesetComment.f_path != None).all()
 
         paths = defaultdict(lambda:defaultdict(list))
 
--- a/rhodecode/templates/changeset/changeset.html	Sun Nov 13 18:05:44 2011 +0200
+++ b/rhodecode/templates/changeset/changeset.html	Sun Nov 13 18:19:31 2011 +0200
@@ -161,7 +161,9 @@
             ${h.form(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id))}
             <strong>${_('Leave a comment')}</strong>
             <div class="clearfix">
-                <div class="comment-help">${_('Comments parsed using RST syntax')}</div>
+                <div class="comment-help">
+                    ${_('Comments parsed using')} <a href="${h.url('rst_help')}">RST</a> ${_('syntax')}
+                </div>
                     ${h.textarea('text')}
             </div>
             <div class="comment-button">