Changeset - c85746b607bd
[Not reviewed]
Merge default
0 1 0
Marcin Kuzminski - 13 years ago 2012-09-02 23:29:39
marcin@python-works.com
merge with beta
1 file changed with 8 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/feed.py
Show inline comments
 
@@ -50,26 +50,32 @@ class FeedController(BaseRepoController)
 
        self.title = self.title = _('%s %s feed') % (c.rhodecode_name, '%s')
 
        self.language = 'en-us'
 
        self.ttl = "5"
 
        self.feed_nr = 20
 

	
 
    def _get_title(self, cs):
 
        return "%s" % (
 
            h.shorter(cs.message, 160)
 
        )
 

	
 
    def __changes(self, cs):
 
        changes = []
 

	
 
        diffprocessor = DiffProcessor(cs.diff())
 
        _diff = cs.diff()
 
        # we need to protect from parsing huge diffs here other way
 
        # we can kill the server, 32*1024 chars is a reasonable limit
 
        HUGE_DIFF = 32 * 1024
 
        if len(_diff) > HUGE_DIFF:
 
            changes = ['\n ' + _('Changeset was too big and was cut off...')]
 
            return changes
 
        diffprocessor = DiffProcessor(_diff)
 
        stats = diffprocessor.prepare(inline_diff=False)
 
        for st in stats:
 
            st.update({'added': st['stats'][0],
 
                       'removed': st['stats'][1]})
 
            changes.append('\n %(operation)s %(filename)s '
 
                           '(%(added)s lines added, %(removed)s lines removed)'
 
                            % st)
 
        return changes
 

	
 
    def __get_desc(self, cs):
 
        desc_msg = []
 
        desc_msg.append('%s %s %s:<br/>' % (cs.author, _('commited on'),
0 comments (0 inline, 0 general)