Show More
@@ -41,6 +41,7 b' from rhodecode.model.db import Repositor' | |||||
41 | from rhodecode.model.pull_request import PullRequestModel |
|
41 | from rhodecode.model.pull_request import PullRequestModel | |
42 | from webob.exc import HTTPBadRequest |
|
42 | from webob.exc import HTTPBadRequest | |
43 | from rhodecode.lib.utils2 import str2bool |
|
43 | from rhodecode.lib.utils2 import str2bool | |
|
44 | from rhodecode.lib.diffs import LimitedDiffContainer | |||
44 |
|
45 | |||
45 | log = logging.getLogger(__name__) |
|
46 | log = logging.getLogger(__name__) | |
46 |
|
47 | |||
@@ -88,6 +89,7 b' class CompareController(BaseRepoControll' | |||||
88 | other_ref = (other_ref_type, other_ref) |
|
89 | other_ref = (other_ref_type, other_ref) | |
89 | other_repo = request.GET.get('repo', org_repo) |
|
90 | other_repo = request.GET.get('repo', org_repo) | |
90 | bundle_compare = str2bool(request.GET.get('bundle', True)) |
|
91 | bundle_compare = str2bool(request.GET.get('bundle', True)) | |
|
92 | c.fulldiff = fulldiff = request.GET.get('fulldiff') | |||
91 |
|
93 | |||
92 | c.swap_url = h.url('compare_url', repo_name=other_repo, |
|
94 | c.swap_url = h.url('compare_url', repo_name=other_repo, | |
93 | org_ref_type=other_ref[0], org_ref=other_ref[1], |
|
95 | org_ref_type=other_ref[0], org_ref=other_ref[1], | |
@@ -138,9 +140,15 b' class CompareController(BaseRepoControll' | |||||
138 |
|
140 | |||
139 | _diff = diffs.differ(other_repo, other_ref, org_repo, org_ref, |
|
141 | _diff = diffs.differ(other_repo, other_ref, org_repo, org_ref, | |
140 | discovery_data, bundle_compare=bundle_compare) |
|
142 | discovery_data, bundle_compare=bundle_compare) | |
141 | diff_processor = diffs.DiffProcessor(_diff, format='gitdiff') |
|
143 | diff_limit = self.cut_off_limit if not fulldiff else None | |
|
144 | diff_processor = diffs.DiffProcessor(_diff, format='gitdiff', | |||
|
145 | diff_limit=diff_limit) | |||
142 | _parsed = diff_processor.prepare() |
|
146 | _parsed = diff_processor.prepare() | |
143 |
|
147 | |||
|
148 | c.limited_diff = False | |||
|
149 | if isinstance(_parsed, LimitedDiffContainer): | |||
|
150 | c.limited_diff = True | |||
|
151 | ||||
144 | c.files = [] |
|
152 | c.files = [] | |
145 | c.changes = {} |
|
153 | c.changes = {} | |
146 |
|
154 |
@@ -18,10 +18,11 b'' | |||||
18 | %endif |
|
18 | %endif | |
19 | </td> |
|
19 | </td> | |
20 | <td><div class="author">${h.person(cs.author)}</div></td> |
|
20 | <td><div class="author">${h.person(cs.author)}</div></td> | |
21 | <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td> |
|
21 | <td><span class="tooltip" title="${h.tooltip(h.age(cs.date))}">${cs.date}</span></td> | |
22 |
<td><div class="message">${h.urlify_commit(h. |
|
22 | <td><div class="message tooltip" title="${h.tooltip(cs.message)}" style="white-space:normal">${h.urlify_commit(h.shorter(cs.message, 60),c.repo_name)}</div></td> | |
23 | </tr> |
|
23 | </tr> | |
24 | %endfor |
|
24 | %endfor | |
|
25 | ||||
25 | %endif |
|
26 | %endif | |
26 | </table> |
|
27 | </table> | |
27 | </div> |
|
28 | </div> |
@@ -47,6 +47,9 b'' | |||||
47 | </div> |
|
47 | </div> | |
48 | %endfor |
|
48 | %endfor | |
49 | </div> |
|
49 | </div> | |
|
50 | % if c.limited_diff: | |||
|
51 | <h5>${_('Changeset was too big and was cut off...')}</h5> | |||
|
52 | % endif | |||
50 | </div> |
|
53 | </div> | |
51 | </div> |
|
54 | </div> | |
52 |
|
55 | |||
@@ -55,7 +58,9 b'' | |||||
55 | %for fid, change, f, stat in c.files: |
|
58 | %for fid, change, f, stat in c.files: | |
56 | ${diff_block.diff_block_simple([c.changes[fid]])} |
|
59 | ${diff_block.diff_block_simple([c.changes[fid]])} | |
57 | %endfor |
|
60 | %endfor | |
58 |
|
61 | % if c.limited_diff: | ||
|
62 | <h4>${_('Changeset was too big and was cut off...')}</h4> | |||
|
63 | % endif | |||
59 | <script type="text/javascript"> |
|
64 | <script type="text/javascript"> | |
60 |
|
65 | |||
61 | YUE.onDOMReady(function(){ |
|
66 | YUE.onDOMReady(function(){ |
General Comments 0
You need to be logged in to leave comments.
Login now