##// END OF EJS Templates
diffs: limit the file context to ~1mln lines. Fixes #4184...
marcink -
r679:df6d63d7 stable
parent child Browse files
Show More
@@ -40,6 +40,10 b' from rhodecode.lib.utils2 import safe_un'
40 40
41 41 log = logging.getLogger(__name__)
42 42
43 # define max context, a file with more than this numbers of lines is unusable
44 # in browser anyway
45 MAX_CONTEXT = 1024 * 1014
46
43 47
44 48 class OPS(object):
45 49 ADD = 'A'
@@ -117,6 +121,10 b' def get_gitdiff(filenode_old, filenode_n'
117 121 """
118 122 # make sure we pass in default context
119 123 context = context or 3
124 # protect against IntOverflow when passing HUGE context
125 if context > MAX_CONTEXT:
126 context = MAX_CONTEXT
127
120 128 submodules = filter(lambda o: isinstance(o, SubModuleNode),
121 129 [filenode_new, filenode_old])
122 130 if submodules:
General Comments 0
You need to be logged in to leave comments. Login now