Mercurial > kallithea
comparison rhodecode/templates/changeset/changeset.html @ 1100:e7d7f05217c1 beta
replaced all decode('utf-8') instances with .decode('utf-8','replace') for more error prof setup,
this way rhodecode could handle displaying non utf8 encoded file paths. This is still an invalid path, but this way we could at least show those paths without errors
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 27 Feb 2011 02:43:44 +0100 |
parents | 51076a2a2b64 |
children | 1cecc7db3106 |
comparison
equal
deleted
inserted
replaced
1099:bc3dafd0e24c | 1100:e7d7f05217c1 |
---|---|
79 </div> | 79 </div> |
80 </div> | 80 </div> |
81 <span style="font-size:1.1em;font-weight: bold">${_('Files affected')}</span> | 81 <span style="font-size:1.1em;font-weight: bold">${_('Files affected')}</span> |
82 <div class="cs_files"> | 82 <div class="cs_files"> |
83 %for change,filenode,diff,cs1,cs2 in c.changes: | 83 %for change,filenode,diff,cs1,cs2 in c.changes: |
84 <div class="cs_${change}">${h.link_to(filenode.path.decode('utf-8'),h.url.current(anchor=h.repo_name_slug('C%s' % filenode.path.decode('utf-8'))))}</div> | 84 <div class="cs_${change}">${h.link_to(filenode.path.decode('utf-8','replace'),h.url.current(anchor=h.repo_name_slug('C%s' % filenode.path.decode('utf-8','replace'))))}</div> |
85 %endfor | 85 %endfor |
86 </div> | 86 </div> |
87 </div> | 87 </div> |
88 | 88 |
89 </div> | 89 </div> |
90 | 90 |
91 %for change,filenode,diff,cs1,cs2 in c.changes: | 91 %for change,filenode,diff,cs1,cs2 in c.changes: |
92 %if change !='removed': | 92 %if change !='removed': |
93 <div style="clear:both;height:10px"></div> | 93 <div style="clear:both;height:10px"></div> |
94 <div class="diffblock"> | 94 <div class="diffblock"> |
95 <div id="${h.repo_name_slug('C%s' % filenode.path.decode('utf-8'))}" class="code-header"> | 95 <div id="${h.repo_name_slug('C%s' % filenode.path.decode('utf-8','replace'))}" class="code-header"> |
96 <div class="changeset_header"> | 96 <div class="changeset_header"> |
97 <span class="changeset_file"> | 97 <span class="changeset_file"> |
98 ${h.link_to_if(change!='removed',filenode.path.decode('utf-8'),h.url('files_home',repo_name=c.repo_name, | 98 ${h.link_to_if(change!='removed',filenode.path.decode('utf-8','replace'),h.url('files_home',repo_name=c.repo_name, |
99 revision=filenode.changeset.raw_id,f_path=filenode.path.decode('utf-8')))} | 99 revision=filenode.changeset.raw_id,f_path=filenode.path.decode('utf-8','replace')))} |
100 </span> | 100 </span> |
101 %if 1: | 101 %if 1: |
102 » <span>${h.link_to(_('diff'), | 102 » <span>${h.link_to(_('diff'), |
103 h.url('files_diff_home',repo_name=c.repo_name,f_path=filenode.path.decode('utf-8'),diff2=cs2,diff1=cs1,diff='diff'))}</span> | 103 h.url('files_diff_home',repo_name=c.repo_name,f_path=filenode.path.decode('utf-8','replace'),diff2=cs2,diff1=cs1,diff='diff'))}</span> |
104 » <span>${h.link_to(_('raw diff'), | 104 » <span>${h.link_to(_('raw diff'), |
105 h.url('files_diff_home',repo_name=c.repo_name,f_path=filenode.path.decode('utf-8'),diff2=cs2,diff1=cs1,diff='raw'))}</span> | 105 h.url('files_diff_home',repo_name=c.repo_name,f_path=filenode.path.decode('utf-8','replace'),diff2=cs2,diff1=cs1,diff='raw'))}</span> |
106 » <span>${h.link_to(_('download diff'), | 106 » <span>${h.link_to(_('download diff'), |
107 h.url('files_diff_home',repo_name=c.repo_name,f_path=filenode.path.decode('utf-8'),diff2=cs2,diff1=cs1,diff='download'))}</span> | 107 h.url('files_diff_home',repo_name=c.repo_name,f_path=filenode.path.decode('utf-8','replace'),diff2=cs2,diff1=cs1,diff='download'))}</span> |
108 %endif | 108 %endif |
109 </div> | 109 </div> |
110 </div> | 110 </div> |
111 <div class="code-body"> | 111 <div class="code-body"> |
112 %if diff: | 112 %if diff: |