Changeset - 5db466f19b8d
[Not reviewed]
default
0 1 0
Marcin Kuzminski - 15 years ago 2010-06-08 23:52:01
marcin@python-works.com
added proposal from mercurial mailing list, to display options for raw diffs, and diffs directly from within changesets view
1 file changed with 10 insertions and 9 deletions:
0 comments (0 inline, 0 general)
pylons_app/templates/changeset/changeset.html
Show inline comments
 
@@ -47,46 +47,47 @@ from pylons_app.lib import filters
 
				%endif						
 
				%for p_cs in reversed(c.changeset.parents):
 
					<div class="parent">${_('Parent')} ${p_cs.revision}: ${h.link_to(p_cs.raw_id,
 
						h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}
 
					</div>
 
				%endfor								
 
			</div>		
 
		</div>    
 
    </div>
 
    
 
    <div style="clear:both;height:10px"></div>
 
    <div class="cs_files">
 
			%for change,filenode,diff in c.changes:
 
			%for change,filenode,diff,cs1,cs2 in c.changes:
 
				<div class="cs_${change}">${h.link_to(filenode.path,h.url.current(anchor='CHANGE-%s'%filenode.path))}</div>
 
			%endfor
 
	</div>
 
	
 
	%for change,filenode,diff in c.changes:
 
	%for change,filenode,diff,cs1,cs2 in c.changes:
 
		%if change !='removed':
 
		<div style="clear:both;height:10px"></div>
 
		<div id="body" class="diffblock">
 
			<div id="${'CHANGE-%s'%filenode.path}" class="code-header">
 
				<div>
 
					<span>
 
						${h.link_to_if(change!='removed',filenode.path,h.url('files_home',repo_name=c.repo_name,
 
						revision=filenode.changeset.raw_id,f_path=filenode.path))}
 
					</span>
 
					
 
					##&raquo; <span style="font-size:77%">${h.link_to(_('diff'),
 
					##h.url.current(diff2=c.diff2,diff1=c.diff1,diff='diff'))}</span>
 
					##&raquo; <span style="font-size:77%">${h.link_to(_('raw diff'),
 
					##h.url.current(diff2=c.diff2,diff1=c.diff1.split(':')[-1],diff='raw'))}</span>
 
					##&raquo; <span style="font-size:77%">${h.link_to(_('download diff'),
 
					##h.url.current(diff2=c.diff2,diff1=c.diff1,diff='download'))}</span>
 
					%if 1:
 
					&raquo; <span style="font-size:77%">${h.link_to(_('diff'),
 
					h.url('files_diff_home',repo_name=c.repo_name,f_path=filenode.path,diff2=cs2,diff1=cs1,diff='diff'))}</span>
 
					&raquo; <span style="font-size:77%">${h.link_to(_('raw diff'),
 
					h.url('files_diff_home',repo_name=c.repo_name,f_path=filenode.path,diff2=cs2,diff1=cs1,diff='raw'))}</span>
 
					&raquo; <span style="font-size:77%">${h.link_to(_('download diff'),
 
					h.url('files_diff_home',repo_name=c.repo_name,f_path=filenode.path,diff2=cs2,diff1=cs1,diff='download'))}</span>
 
					%endif
 
				</div>
 
			</div>
 
			<div class="code-body">        
 
					%if diff:
 
						${diff|n}
 
					%else:
 
						${_('No changes in this file')}
 
					%endif
 
			</div>
 
		</div>
 
		%endif
 
	%endfor
0 comments (0 inline, 0 general)