Changeset - a8c9c0094ddf
[Not reviewed]
beta
0 7 0
Marcin Kuzminski - 14 years ago 2012-03-21 18:19:22
marcin@python-works.com
White space cleanup
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/model/comment.py
Show inline comments
 
@@ -54,40 +54,40 @@ class ChangesetCommentsModel(BaseModel):
 
    def create(self, text, repo_id, user_id, revision, f_path=None,
 
               line_no=None):
 
        """
 
        Creates new comment for changeset
 

	
 
        :param text:
 
        :param repo_id:
 
        :param user_id:
 
        :param revision:
 
        :param f_path:
 
        :param line_no:
 
        """
 

	
 
        if text:
 
            repo = Repository.get(repo_id)
 
            cs = repo.scm_instance.get_changeset(revision)
 
            desc = cs.message
 
            author_email = cs.author_email
 
            comment = ChangesetComment()
 
            comment.repo = repo
 
            comment.user_id = user_id
 
            comment.revision = revision
 
            comment.text = text
 
            comment.f_path = f_path
 
            comment.line_no = line_no
 

	
 
            self.sa.add(comment)
 
            self.sa.flush()
 

	
 
            # make notification
 
            line = ''
 
            if line_no:
 
                line = _('on line %s') % line_no
 
            subj = h.link_to('Re commit: %(commit_desc)s %(line)s' % \
 
                                    {'commit_desc': desc, 'line': line},
 
                             h.url('changeset_home', repo_name=repo.repo_name,
 
                                   revision=revision,
 
                                   anchor='comment-%s' % comment.comment_id,
 
                                   qualified=True,
 
                                   )
 
                             )
0 comments (0 inline, 0 general)