aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Kuzminski <marcin@python-works.com>2012-09-02 23:29:39 +0200
committerMarcin Kuzminski <marcin@python-works.com>2012-09-02 23:29:39 +0200
commit136537fd8e24f0d60d0a3bae4c88d1e81204ca74 (patch)
tree22ae948b67e3a3f10820fd51fc8ec4b45d3b8f87
parent7fcf5da7fd5a046646cc6388cbf1a395f23935d1 (diff)
parent90acb20552abedf011667387d89f2dfb35cfc686 (diff)
merge with beta
-rw-r--r--rhodecode/controllers/feed.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/rhodecode/controllers/feed.py b/rhodecode/controllers/feed.py
index 10874e9e..4ae444cf 100644
--- a/rhodecode/controllers/feed.py
+++ b/rhodecode/controllers/feed.py
@@ -59,8 +59,14 @@ class FeedController(BaseRepoController):
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],