##// END OF EJS Templates
Notification fixes...
marcink -
r2178:989c137f beta
parent child Browse files
Show More
@@ -29,7 +29,7 import traceback
29 from pylons.i18n.translation import _
29 from pylons.i18n.translation import _
30 from sqlalchemy.util.compat import defaultdict
30 from sqlalchemy.util.compat import defaultdict
31
31
32 from rhodecode.lib.utils2 import extract_mentioned_users
32 from rhodecode.lib.utils2 import extract_mentioned_users, safe_unicode
33 from rhodecode.lib import helpers as h
33 from rhodecode.lib import helpers as h
34 from rhodecode.model import BaseModel
34 from rhodecode.model import BaseModel
35 from rhodecode.model.db import ChangesetComment, User, Repository, Notification
35 from rhodecode.model.db import ChangesetComment, User, Repository, Notification
@@ -67,7 +67,7 class ChangesetCommentsModel(BaseModel):
67 if text:
67 if text:
68 repo = Repository.get(repo_id)
68 repo = Repository.get(repo_id)
69 cs = repo.scm_instance.get_changeset(revision)
69 cs = repo.scm_instance.get_changeset(revision)
70 desc = cs.message
70 desc = "%s - %s" % (cs.short_id, h.shorter(cs.message, 256))
71 author_email = cs.author_email
71 author_email = cs.author_email
72 comment = ChangesetComment()
72 comment = ChangesetComment()
73 comment.repo = repo
73 comment.repo = repo
@@ -83,7 +83,8 class ChangesetCommentsModel(BaseModel):
83 line = ''
83 line = ''
84 if line_no:
84 if line_no:
85 line = _('on line %s') % line_no
85 line = _('on line %s') % line_no
86 subj = h.link_to('Re commit: %(commit_desc)s %(line)s' % \
86 subj = safe_unicode(
87 h.link_to('Re commit: %(commit_desc)s %(line)s' % \
87 {'commit_desc': desc, 'line': line},
88 {'commit_desc': desc, 'line': line},
88 h.url('changeset_home', repo_name=repo.repo_name,
89 h.url('changeset_home', repo_name=repo.repo_name,
89 revision=revision,
90 revision=revision,
@@ -91,6 +92,8 class ChangesetCommentsModel(BaseModel):
91 qualified=True,
92 qualified=True,
92 )
93 )
93 )
94 )
95 )
96
94 body = text
97 body = text
95
98
96 # get the current participants of this changeset
99 # get the current participants of this changeset
General Comments 0
You need to be logged in to leave comments. Login now