Show More
@@ -26,7 +26,7 b' fixes' | |||||
26 | - windows fixes for os.kill #133 |
|
26 | - windows fixes for os.kill #133 | |
27 | - fixes path splitting for windows issues #148 |
|
27 | - fixes path splitting for windows issues #148 | |
28 | - fixed issue #143 wrong import on migration to 1.1.X |
|
28 | - fixed issue #143 wrong import on migration to 1.1.X | |
29 |
|
29 | - fixed problems with displaying binary files, thanks to Thomas Waldmann | ||
30 |
|
30 | |||
31 | 1.1.7 (**2011-03-23**) |
|
31 | 1.1.7 (**2011-03-23**) | |
32 | ====================== |
|
32 | ====================== |
@@ -4,10 +4,10 b'' | |||||
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
5 |
|
5 | |||
6 | Feed controller for rhodecode |
|
6 | Feed controller for rhodecode | |
7 |
|
7 | |||
8 | :created_on: Apr 23, 2010 |
|
8 | :created_on: Apr 23, 2010 | |
9 | :author: marcink |
|
9 | :author: marcink | |
10 |
:copyright: (C) 2009-201 |
|
10 | :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com> | |
11 | :license: GPLv3, see COPYING for more details. |
|
11 | :license: GPLv3, see COPYING for more details. | |
12 | """ |
|
12 | """ | |
13 | # This program is free software: you can redistribute it and/or modify |
|
13 | # This program is free software: you can redistribute it and/or modify |
@@ -7,7 +7,7 b'' | |||||
7 |
|
7 | |||
8 | :created_on: Apr 21, 2010 |
|
8 | :created_on: Apr 21, 2010 | |
9 | :author: marcink |
|
9 | :author: marcink | |
10 |
:copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com> |
|
10 | :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com> | |
11 | :license: GPLv3, see COPYING for more details. |
|
11 | :license: GPLv3, see COPYING for more details. | |
12 | """ |
|
12 | """ | |
13 | # This program is free software: you can redistribute it and/or modify |
|
13 | # This program is free software: you can redistribute it and/or modify | |
@@ -45,6 +45,7 b' from vcs.utils import diffs as differ' | |||||
45 |
|
45 | |||
46 | log = logging.getLogger(__name__) |
|
46 | log = logging.getLogger(__name__) | |
47 |
|
47 | |||
|
48 | ||||
48 | class FilesController(BaseController): |
|
49 | class FilesController(BaseController): | |
49 |
|
50 | |||
50 | @LoginRequired() |
|
51 | @LoginRequired() | |
@@ -58,7 +59,7 b' class FilesController(BaseController):' | |||||
58 | """ |
|
59 | """ | |
59 | Safe way to get changeset if error occur it redirects to tip with |
|
60 | Safe way to get changeset if error occur it redirects to tip with | |
60 | proper message |
|
61 | proper message | |
61 |
|
62 | |||
62 | :param rev: revision to fetch |
|
63 | :param rev: revision to fetch | |
63 | :param repo_name: repo name to redirect after |
|
64 | :param repo_name: repo name to redirect after | |
64 | """ |
|
65 | """ | |
@@ -228,10 +229,11 b' class FilesController(BaseController):' | |||||
228 | return diff.raw_diff() |
|
229 | return diff.raw_diff() | |
229 |
|
230 | |||
230 | elif c.action == 'diff': |
|
231 | elif c.action == 'diff': | |
231 | if node1.size > self.cut_off_limit or node2.size > self.cut_off_limit: |
|
232 | if node1.is_binary or node2.is_binary: | |
232 | c.cur_diff = _('Diff is to big to display') |
|
|||
233 | elif node1.is_binary or node2.is_binary: |
|
|||
234 | c.cur_diff = _('Binary file') |
|
233 | c.cur_diff = _('Binary file') | |
|
234 | elif node1.size > self.cut_off_limit or \ | |||
|
235 | node2.size > self.cut_off_limit: | |||
|
236 | c.cur_diff = _('Diff is too big to display') | |||
235 | else: |
|
237 | else: | |
236 | c.cur_diff = diff.as_html() |
|
238 | c.cur_diff = diff.as_html() | |
237 | else: |
|
239 | else: |
@@ -4,10 +4,10 b'' | |||||
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
5 |
|
5 | |||
6 | Home controller for Rhodecode |
|
6 | Home controller for Rhodecode | |
7 |
|
7 | |||
8 | :created_on: Feb 18, 2010 |
|
8 | :created_on: Feb 18, 2010 | |
9 | :author: marcink |
|
9 | :author: marcink | |
10 |
:copyright: (C) 2009-201 |
|
10 | :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com> | |
11 | :license: GPLv3, see COPYING for more details. |
|
11 | :license: GPLv3, see COPYING for more details. | |
12 | """ |
|
12 | """ | |
13 | # This program is free software: you can redistribute it and/or modify |
|
13 | # This program is free software: you can redistribute it and/or modify |
@@ -85,7 +85,10 b'' | |||||
85 | <div id="footer-inner" class="title bottom-left-rounded-corner bottom-right-rounded-corner"> |
|
85 | <div id="footer-inner" class="title bottom-left-rounded-corner bottom-right-rounded-corner"> | |
86 | <div> |
|
86 | <div> | |
87 | <p class="footer-link">${h.link_to(_('Submit a bug'),h.url('bugtracker'))}</p> |
|
87 | <p class="footer-link">${h.link_to(_('Submit a bug'),h.url('bugtracker'))}</p> | |
88 | <p class="footer-link-right"><a href="${h.url('rhodecode_official')}">RhodeCode</a> ${c.rhodecode_version} © 2010-2011 by Marcin Kuzminski</p> |
|
88 | <p class="footer-link-right"> | |
|
89 | <a href="${h.url('rhodecode_official')}">RhodeCode</a> | |||
|
90 | ${c.rhodecode_version} © 2010-${h.datetime.today().year} by Marcin Kuzminski | |||
|
91 | </p> | |||
89 | </div> |
|
92 | </div> | |
90 | </div> |
|
93 | </div> | |
91 | <script type="text/javascript"> |
|
94 | <script type="text/javascript"> |
@@ -32,16 +32,15 b'' | |||||
32 | </div> |
|
32 | </div> | |
33 | <div id="graph_content"> |
|
33 | <div id="graph_content"> | |
34 | <div class="container_header"> |
|
34 | <div class="container_header"> | |
35 |
|
35 | ${h.form(h.url.current(),method='get')} | ||
36 | ${h.form(h.url.current(),method='get')} |
|
36 | <div class="info_box"> | |
37 | <div class="info_box"> |
|
37 | <span>${_('Show')}:</span> | |
38 | <span>${_('Show')}:</span> |
|
38 | ${h.text('size',size=1,value=c.size)} | |
39 | ${h.text('size',size=1,value=c.size)} |
|
39 | <span>${_('revisions')}</span> | |
40 | <span>${_('revisions')}</span> |
|
40 | ${h.submit('set',_('set'))} | |
41 | ${h.submit('set',_('set'))} |
|
41 | ||
42 | </div> |
|
42 | </div> | |
43 | ${h.end_form()} |
|
43 | ${h.end_form()} | |
44 |
|
||||
45 | </div> |
|
44 | </div> | |
46 | %for cnt,cs in enumerate(c.pagination): |
|
45 | %for cnt,cs in enumerate(c.pagination): | |
47 | <div id="chg_${cnt+1}" class="container"> |
|
46 | <div id="chg_${cnt+1}" class="container"> | |
@@ -97,7 +96,7 b'' | |||||
97 | </div> |
|
96 | </div> | |
98 | </div> |
|
97 | </div> | |
99 |
|
98 | |||
100 |
<script type="text/javascript" src="${h.url( |
|
99 | <script type="text/javascript" src="${h.url('/js/graph.js')}"></script> | |
101 | <script type="text/javascript"> |
|
100 | <script type="text/javascript"> | |
102 | YAHOO.util.Event.onDOMReady(function(){ |
|
101 | YAHOO.util.Event.onDOMReady(function(){ | |
103 | function set_canvas() { |
|
102 | function set_canvas() { |
@@ -1,3 +1,5 b'' | |||||
|
1 | ## -*- coding: utf-8 -*- | |||
|
2 | ||||
1 | <%inherit file="/base/base.html"/> |
|
3 | <%inherit file="/base/base.html"/> | |
2 |
|
4 | |||
3 | <%def name="title()"> |
|
5 | <%def name="title()"> | |
@@ -81,7 +83,7 b'' | |||||
81 | <span style="font-size:1.1em;font-weight: bold">${_('Files affected')}</span> |
|
83 | <span style="font-size:1.1em;font-weight: bold">${_('Files affected')}</span> | |
82 | <div class="cs_files"> |
|
84 | <div class="cs_files"> | |
83 | %for change,filenode,diff,cs1,cs2 in c.changes: |
|
85 | %for change,filenode,diff,cs1,cs2 in c.changes: | |
84 | <div class="cs_${change}">${h.link_to(filenode.path,h.url.current(anchor='CHANGE-%s'%filenode.path))}</div> |
|
86 | <div class="cs_${change}">${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=h.repo_name_slug('CHANGE-%s' % h.safe_unicode(filenode.path))))}</div> | |
85 | %endfor |
|
87 | %endfor | |
86 | </div> |
|
88 | </div> | |
87 | </div> |
|
89 | </div> | |
@@ -92,19 +94,19 b'' | |||||
92 | %if change !='removed': |
|
94 | %if change !='removed': | |
93 | <div style="clear:both;height:10px"></div> |
|
95 | <div style="clear:both;height:10px"></div> | |
94 | <div id="body" class="diffblock"> |
|
96 | <div id="body" class="diffblock"> | |
95 | <div id="${'CHANGE-%s'%filenode.path}" class="code-header"> |
|
97 | <div id="${h.repo_name_slug('CHANGE-%s' % h.safe_unicode(filenode.path))}" class="code-header"> | |
96 | <div class="changeset_header"> |
|
98 | <div class="changeset_header"> | |
97 | <span class="changeset_file"> |
|
99 | <span class="changeset_file"> | |
98 | ${h.link_to_if(change!='removed',filenode.path,h.url('files_home',repo_name=c.repo_name, |
|
100 | ${h.link_to_if(change!='removed',h.safe_unicode(filenode.path),h.url('files_home',repo_name=c.repo_name, | |
99 | revision=filenode.changeset.raw_id,f_path=filenode.path))} |
|
101 | revision=filenode.changeset.raw_id,f_path=h.safe_unicode(filenode.path)))} | |
100 | </span> |
|
102 | </span> | |
101 | %if 1: |
|
103 | %if 1: | |
102 | » <span>${h.link_to(_('diff'), |
|
104 | » <span>${h.link_to(_('diff'), | |
103 | h.url('files_diff_home',repo_name=c.repo_name,f_path=filenode.path,diff2=cs2,diff1=cs1,diff='diff'))}</span> |
|
105 | h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='diff'))}</span> | |
104 | » <span>${h.link_to(_('raw diff'), |
|
106 | » <span>${h.link_to(_('raw diff'), | |
105 | h.url('files_diff_home',repo_name=c.repo_name,f_path=filenode.path,diff2=cs2,diff1=cs1,diff='raw'))}</span> |
|
107 | h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='raw'))}</span> | |
106 | » <span>${h.link_to(_('download diff'), |
|
108 | » <span>${h.link_to(_('download diff'), | |
107 | h.url('files_diff_home',repo_name=c.repo_name,f_path=filenode.path,diff2=cs2,diff1=cs1,diff='download'))}</span> |
|
109 | h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='download'))}</span> | |
108 | %endif |
|
110 | %endif | |
109 | </div> |
|
111 | </div> | |
110 | </div> |
|
112 | </div> |
@@ -51,8 +51,8 b'' | |||||
51 | ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} |
|
51 | ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} | |
52 | ${h.hidden('diff2',c.file.last_changeset.raw_id)} |
|
52 | ${h.hidden('diff2',c.file.last_changeset.raw_id)} | |
53 | ${h.select('diff1',c.file.last_changeset.raw_id,c.file_history)} |
|
53 | ${h.select('diff1',c.file.last_changeset.raw_id,c.file_history)} | |
54 |
${h.submit('diff','diff to revision',class_="ui-button |
|
54 | ${h.submit('diff','diff to revision',class_="ui-button")} | |
55 |
${h.submit('show_rev','show at revision',class_="ui-button |
|
55 | ${h.submit('show_rev','show at revision',class_="ui-button")} | |
56 | ${h.end_form()} |
|
56 | ${h.end_form()} | |
57 | </div> |
|
57 | </div> | |
58 | </dd> |
|
58 | </dd> | |
@@ -63,24 +63,28 b'' | |||||
63 | <div class="commit">"${c.file.message}"</div> |
|
63 | <div class="commit">"${c.file.message}"</div> | |
64 | </div> |
|
64 | </div> | |
65 | <div class="code-body"> |
|
65 | <div class="code-body"> | |
|
66 | %if c.file.is_binary: | |||
|
67 | ${_('Binary file')} | |||
|
68 | %else: | |||
66 | % if c.file.size < c.cut_off_limit: |
|
69 | % if c.file.size < c.cut_off_limit: | |
67 |
${h.pygmentize_annotation(c.file,linenos=True,anchorlinenos=True,lineanchors=' |
|
70 | ${h.pygmentize_annotation(c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} | |
68 | %else: |
|
71 | %else: | |
69 | ${_('File is to big to display')} ${h.link_to(_('show as raw'), |
|
72 | ${_('File is to big to display')} ${h.link_to(_('show as raw'), | |
70 | h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.revision,f_path=c.f_path))} |
|
73 | h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.revision,f_path=c.f_path))} | |
71 |
%endif |
|
74 | %endif | |
|
75 | <script type="text/javascript"> | |||
|
76 | YAHOO.util.Event.onDOMReady(function(){ | |||
|
77 | YAHOO.util.Event.addListener('show_rev','click',function(e){ | |||
|
78 | YAHOO.util.Event.preventDefault(e); | |||
|
79 | var cs = YAHOO.util.Dom.get('diff1').value; | |||
|
80 | var url = "${h.url('files_annotate_home',repo_name=c.repo_name,revision='__CS__',f_path=c.f_path)}".replace('__CS__',cs); | |||
|
81 | window.location = url; | |||
|
82 | }); | |||
|
83 | }); | |||
|
84 | </script> | |||
|
85 | %endif | |||
72 | </div> |
|
86 | </div> | |
73 | </div> |
|
87 | </div> | |
74 | <script type="text/javascript"> |
|
|||
75 | YAHOO.util.Event.onDOMReady(function(){ |
|
|||
76 | YAHOO.util.Event.addListener('show_rev','click',function(e){ |
|
|||
77 | YAHOO.util.Event.preventDefault(e); |
|
|||
78 | var cs = YAHOO.util.Dom.get('diff1').value; |
|
|||
79 | var url = "${h.url('files_annotate_home',repo_name=c.repo_name,revision='__CS__',f_path=c.f_path)}".replace('__CS__',cs); |
|
|||
80 | window.location = url; |
|
|||
81 | }); |
|
|||
82 | }); |
|
|||
83 | </script> |
|
|||
84 | </div> |
|
88 | </div> | |
85 | </div> |
|
89 | </div> | |
86 | </div> |
|
90 | </div> |
@@ -49,7 +49,7 b'' | |||||
49 | %for cnt,node in enumerate(c.files_list): |
|
49 | %for cnt,node in enumerate(c.files_list): | |
50 | <tr class="parity${cnt%2}"> |
|
50 | <tr class="parity${cnt%2}"> | |
51 | <td> |
|
51 | <td> | |
52 | ${h.link_to(node.name,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=node.path),class_=file_class(node))} |
|
52 | ${h.link_to(node.name,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=h.safe_unicode(node.path)),class_=file_class(node))} | |
53 | </td> |
|
53 | </td> | |
54 | <td> |
|
54 | <td> | |
55 | %if node.is_file(): |
|
55 | %if node.is_file(): | |
@@ -64,7 +64,7 b'' | |||||
64 | <td> |
|
64 | <td> | |
65 | %if node.is_file(): |
|
65 | %if node.is_file(): | |
66 | <span class="tooltip" title="${node.last_changeset.raw_id}"> |
|
66 | <span class="tooltip" title="${node.last_changeset.raw_id}"> | |
67 | ${node.last_changeset.revision}</span> |
|
67 | ${'r%s:%s' % (node.last_changeset.revision,node.last_changeset.short_id)}</span> | |
68 | %endif |
|
68 | %endif | |
69 | </td> |
|
69 | </td> | |
70 | <td> |
|
70 | <td> |
@@ -22,8 +22,8 b'' | |||||
22 | ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} |
|
22 | ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} | |
23 | ${h.hidden('diff2',c.files_list.last_changeset.raw_id)} |
|
23 | ${h.hidden('diff2',c.files_list.last_changeset.raw_id)} | |
24 | ${h.select('diff1',c.files_list.last_changeset.raw_id,c.file_history)} |
|
24 | ${h.select('diff1',c.files_list.last_changeset.raw_id,c.file_history)} | |
25 |
${h.submit('diff','diff to revision',class_="ui-button |
|
25 | ${h.submit('diff','diff to revision',class_="ui-button")} | |
26 |
${h.submit('show_rev','show at revision',class_="ui-button |
|
26 | ${h.submit('show_rev','show at revision',class_="ui-button")} | |
27 | ${h.end_form()} |
|
27 | ${h.end_form()} | |
28 | </div> |
|
28 | </div> | |
29 | </dd> |
|
29 | </dd> | |
@@ -36,12 +36,16 b'' | |||||
36 | <div class="commit">"${c.files_list.last_changeset.message}"</div> |
|
36 | <div class="commit">"${c.files_list.last_changeset.message}"</div> | |
37 | </div> |
|
37 | </div> | |
38 | <div class="code-body"> |
|
38 | <div class="code-body"> | |
|
39 | %if c.files_list.is_binary: | |||
|
40 | ${_('Binary file')} | |||
|
41 | %else: | |||
39 | % if c.files_list.size < c.cut_off_limit: |
|
42 | % if c.files_list.size < c.cut_off_limit: | |
40 |
${h.pygmentize(c.files_list,linenos=True,anchorlinenos=True,lineanchors=' |
|
43 | ${h.pygmentize(c.files_list,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} | |
41 | %else: |
|
44 | %else: | |
42 | ${_('File is to big to display')} ${h.link_to(_('show as raw'), |
|
45 | ${_('File is to big to display')} ${h.link_to(_('show as raw'), | |
43 | h.url('files_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))} |
|
46 | h.url('files_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))} | |
44 | %endif |
|
47 | %endif | |
|
48 | %endif | |||
45 | </div> |
|
49 | </div> | |
46 | </div> |
|
50 | </div> | |
47 |
|
51 |
General Comments 0
You need to be logged in to leave comments.
Login now