# HG changeset patch # User Marcin Kuzminski # Date 2010-06-08 23:52:01 # Node ID 5db466f19b8d07295b7b69b0c98d5030cac267b8 # Parent cad478edb1c7e7f964431d26ba342d8cd97f6bea added proposal from mercurial mailing list, to display options for raw diffs, and diffs directly from within changesets view diff --git a/pylons_app/templates/changeset/changeset.html b/pylons_app/templates/changeset/changeset.html --- a/pylons_app/templates/changeset/changeset.html +++ b/pylons_app/templates/changeset/changeset.html @@ -56,12 +56,12 @@ from pylons_app.lib import filters
- %for change,filenode,diff in c.changes: + %for change,filenode,diff,cs1,cs2 in c.changes:
${h.link_to(filenode.path,h.url.current(anchor='CHANGE-%s'%filenode.path))}
%endfor
- %for change,filenode,diff in c.changes: + %for change,filenode,diff,cs1,cs2 in c.changes: %if change !='removed':
@@ -71,13 +71,14 @@ from pylons_app.lib import filters ${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))} - - ##» ${h.link_to(_('diff'), - ##h.url.current(diff2=c.diff2,diff1=c.diff1,diff='diff'))} - ##» ${h.link_to(_('raw diff'), - ##h.url.current(diff2=c.diff2,diff1=c.diff1.split(':')[-1],diff='raw'))} - ##» ${h.link_to(_('download diff'), - ##h.url.current(diff2=c.diff2,diff1=c.diff1,diff='download'))} + %if 1: + » ${h.link_to(_('diff'), + h.url('files_diff_home',repo_name=c.repo_name,f_path=filenode.path,diff2=cs2,diff1=cs1,diff='diff'))} + » ${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'))} + » ${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'))} + %endif