# HG changeset patch # User Marcin Kuzminski # Date 1346621379 -7200 # Node ID c85746b607bdb3a98f1e0379f7fb5ab3f7ee4bd7 # Parent f9c685144aebd8c6e77cbc464c00de8173e3f670# Parent a93c07ade43a42af9f09fb0705965f164c0be40f merge with beta diff -r f9c685144aeb -r c85746b607bd rhodecode/controllers/feed.py --- a/rhodecode/controllers/feed.py Sun Sep 02 23:09:00 2012 +0200 +++ b/rhodecode/controllers/feed.py Sun Sep 02 23:29:39 2012 +0200 @@ -59,8 +59,14 @@ 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],