Show More
@@ -26,7 +26,7 b' fixes' | |||
|
26 | 26 | - windows fixes for os.kill #133 |
|
27 | 27 | - fixes path splitting for windows issues #148 |
|
28 | 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 | 31 | 1.1.7 (**2011-03-23**) |
|
32 | 32 | ====================== |
@@ -4,10 +4,10 b'' | |||
|
4 | 4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
5 | 5 | |
|
6 | 6 | Feed controller for rhodecode |
|
7 | ||
|
7 | ||
|
8 | 8 | :created_on: Apr 23, 2010 |
|
9 | 9 | :author: marcink |
|
10 |
:copyright: (C) 2009-201 |
|
|
10 | :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com> | |
|
11 | 11 | :license: GPLv3, see COPYING for more details. |
|
12 | 12 | """ |
|
13 | 13 | # This program is free software: you can redistribute it and/or modify |
@@ -7,7 +7,7 b'' | |||
|
7 | 7 | |
|
8 | 8 | :created_on: Apr 21, 2010 |
|
9 | 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 | 11 | :license: GPLv3, see COPYING for more details. |
|
12 | 12 | """ |
|
13 | 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 | 46 | log = logging.getLogger(__name__) |
|
47 | 47 | |
|
48 | ||
|
48 | 49 | class FilesController(BaseController): |
|
49 | 50 | |
|
50 | 51 | @LoginRequired() |
@@ -58,7 +59,7 b' class FilesController(BaseController):' | |||
|
58 | 59 | """ |
|
59 | 60 | Safe way to get changeset if error occur it redirects to tip with |
|
60 | 61 | proper message |
|
61 | ||
|
62 | ||
|
62 | 63 | :param rev: revision to fetch |
|
63 | 64 | :param repo_name: repo name to redirect after |
|
64 | 65 | """ |
@@ -228,10 +229,11 b' class FilesController(BaseController):' | |||
|
228 | 229 | return diff.raw_diff() |
|
229 | 230 | |
|
230 | 231 | elif c.action == 'diff': |
|
231 | if node1.size > self.cut_off_limit or node2.size > self.cut_off_limit: | |
|
232 | c.cur_diff = _('Diff is to big to display') | |
|
233 | elif node1.is_binary or node2.is_binary: | |
|
232 | if node1.is_binary or node2.is_binary: | |
|
234 | 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 | 237 | else: |
|
236 | 238 | c.cur_diff = diff.as_html() |
|
237 | 239 | else: |
@@ -4,10 +4,10 b'' | |||
|
4 | 4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
5 | 5 | |
|
6 | 6 | Home controller for Rhodecode |
|
7 | ||
|
7 | ||
|
8 | 8 | :created_on: Feb 18, 2010 |
|
9 | 9 | :author: marcink |
|
10 |
:copyright: (C) 2009-201 |
|
|
10 | :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com> | |
|
11 | 11 | :license: GPLv3, see COPYING for more details. |
|
12 | 12 | """ |
|
13 | 13 | # This program is free software: you can redistribute it and/or modify |
@@ -85,7 +85,10 b'' | |||
|
85 | 85 | <div id="footer-inner" class="title bottom-left-rounded-corner bottom-right-rounded-corner"> |
|
86 | 86 | <div> |
|
87 | 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 | 92 | </div> |
|
90 | 93 | </div> |
|
91 | 94 | <script type="text/javascript"> |
@@ -32,16 +32,15 b'' | |||
|
32 | 32 | </div> |
|
33 | 33 | <div id="graph_content"> |
|
34 | 34 | <div class="container_header"> |
|
35 | ||
|
36 | ${h.form(h.url.current(),method='get')} | |
|
37 | <div class="info_box"> | |
|
38 | <span>${_('Show')}:</span> | |
|
39 | ${h.text('size',size=1,value=c.size)} | |
|
40 | <span>${_('revisions')}</span> | |
|
41 | ${h.submit('set',_('set'))} | |
|
42 | </div> | |
|
43 | ${h.end_form()} | |
|
44 | ||
|
35 | ${h.form(h.url.current(),method='get')} | |
|
36 | <div class="info_box"> | |
|
37 | <span>${_('Show')}:</span> | |
|
38 | ${h.text('size',size=1,value=c.size)} | |
|
39 | <span>${_('revisions')}</span> | |
|
40 | ${h.submit('set',_('set'))} | |
|
41 | ||
|
42 | </div> | |
|
43 | ${h.end_form()} | |
|
45 | 44 | </div> |
|
46 | 45 | %for cnt,cs in enumerate(c.pagination): |
|
47 | 46 | <div id="chg_${cnt+1}" class="container"> |
@@ -97,7 +96,7 b'' | |||
|
97 | 96 | </div> |
|
98 | 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 | 100 | <script type="text/javascript"> |
|
102 | 101 | YAHOO.util.Event.onDOMReady(function(){ |
|
103 | 102 | function set_canvas() { |
@@ -1,3 +1,5 b'' | |||
|
1 | ## -*- coding: utf-8 -*- | |
|
2 | ||
|
1 | 3 | <%inherit file="/base/base.html"/> |
|
2 | 4 | |
|
3 | 5 | <%def name="title()"> |
@@ -81,7 +83,7 b'' | |||
|
81 | 83 | <span style="font-size:1.1em;font-weight: bold">${_('Files affected')}</span> |
|
82 | 84 | <div class="cs_files"> |
|
83 | 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 | 87 | %endfor |
|
86 | 88 | </div> |
|
87 | 89 | </div> |
@@ -92,19 +94,19 b'' | |||
|
92 | 94 | %if change !='removed': |
|
93 | 95 | <div style="clear:both;height:10px"></div> |
|
94 | 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 | 98 | <div class="changeset_header"> |
|
97 | 99 | <span class="changeset_file"> |
|
98 | ${h.link_to_if(change!='removed',filenode.path,h.url('files_home',repo_name=c.repo_name, | |
|
99 | revision=filenode.changeset.raw_id,f_path=filenode.path))} | |
|
100 | ${h.link_to_if(change!='removed',h.safe_unicode(filenode.path),h.url('files_home',repo_name=c.repo_name, | |
|
101 | revision=filenode.changeset.raw_id,f_path=h.safe_unicode(filenode.path)))} | |
|
100 | 102 | </span> |
|
101 | 103 | %if 1: |
|
102 | 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 | 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 | 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 | 110 | %endif |
|
109 | 111 | </div> |
|
110 | 112 | </div> |
@@ -51,8 +51,8 b'' | |||
|
51 | 51 | ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} |
|
52 | 52 | ${h.hidden('diff2',c.file.last_changeset.raw_id)} |
|
53 | 53 | ${h.select('diff1',c.file.last_changeset.raw_id,c.file_history)} |
|
54 |
${h.submit('diff','diff to revision',class_="ui-button |
|
|
55 |
${h.submit('show_rev','show at 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")} | |
|
56 | 56 | ${h.end_form()} |
|
57 | 57 | </div> |
|
58 | 58 | </dd> |
@@ -63,24 +63,28 b'' | |||
|
63 | 63 | <div class="commit">"${c.file.message}"</div> |
|
64 | 64 | </div> |
|
65 | 65 | <div class="code-body"> |
|
66 | %if c.file.is_binary: | |
|
67 | ${_('Binary file')} | |
|
68 | %else: | |
|
66 | 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 | 71 | %else: |
|
69 | 72 | ${_('File is to big to display')} ${h.link_to(_('show as raw'), |
|
70 | 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 | 86 | </div> |
|
73 | 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 | 88 | </div> |
|
85 | 89 | </div> |
|
86 | 90 | </div> |
@@ -49,7 +49,7 b'' | |||
|
49 | 49 | %for cnt,node in enumerate(c.files_list): |
|
50 | 50 | <tr class="parity${cnt%2}"> |
|
51 | 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 | 53 | </td> |
|
54 | 54 | <td> |
|
55 | 55 | %if node.is_file(): |
@@ -64,7 +64,7 b'' | |||
|
64 | 64 | <td> |
|
65 | 65 | %if node.is_file(): |
|
66 | 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 | 68 | %endif |
|
69 | 69 | </td> |
|
70 | 70 | <td> |
@@ -22,8 +22,8 b'' | |||
|
22 | 22 | ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} |
|
23 | 23 | ${h.hidden('diff2',c.files_list.last_changeset.raw_id)} |
|
24 | 24 | ${h.select('diff1',c.files_list.last_changeset.raw_id,c.file_history)} |
|
25 |
${h.submit('diff','diff to revision',class_="ui-button |
|
|
26 |
${h.submit('show_rev','show at 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")} | |
|
27 | 27 | ${h.end_form()} |
|
28 | 28 | </div> |
|
29 | 29 | </dd> |
@@ -36,12 +36,16 b'' | |||
|
36 | 36 | <div class="commit">"${c.files_list.last_changeset.message}"</div> |
|
37 | 37 | </div> |
|
38 | 38 | <div class="code-body"> |
|
39 | %if c.files_list.is_binary: | |
|
40 | ${_('Binary file')} | |
|
41 | %else: | |
|
39 | 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 | 44 | %else: |
|
42 | 45 | ${_('File is to big to display')} ${h.link_to(_('show as raw'), |
|
43 | 46 | h.url('files_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))} |
|
44 | 47 | %endif |
|
48 | %endif | |
|
45 | 49 | </div> |
|
46 | 50 | </div> |
|
47 | 51 |
General Comments 0
You need to be logged in to leave comments.
Login now