Mercurial > hg
changeset 3353:2edf53386d86
gitweb: add file diff view
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Wed, 11 Oct 2006 16:19:11 -0700 |
parents | 04fa31a43b93 |
children | 6152c00245e5 |
files | templates/gitweb/fileannotate.tmpl templates/gitweb/filediff.tmpl templates/gitweb/filelog.tmpl templates/gitweb/filerevision.tmpl templates/gitweb/map |
diffstat | 5 files changed, 54 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/templates/gitweb/fileannotate.tmpl Wed Oct 11 23:31:05 2006 +0200 +++ b/templates/gitweb/fileannotate.tmpl Wed Oct 11 16:19:11 2006 -0700 @@ -18,7 +18,9 @@ <a href="{url}rev/#node|short#{getentries}">changeset</a> | <a href="{url}file/{node|short}/#file|urlescape#{getentries}">file</a> | <a href="{url}log/{node|short}/#file|urlescape#{getentries}">revisions</a> | -annotate | <a href="{url}raw-annotate/{node|short}/#file|urlescape#">raw</a><br/> +annotate | +<a href="{url}diff/{node|short}/{file|urlescape}{getentries}">diff</a> | +<a href="{url}raw-annotate/{node|short}/#file|urlescape#">raw</a><br/> </div> <div class="title">#file|escape#</div>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/gitweb/filediff.tmpl Wed Oct 11 16:19:11 2006 -0700 @@ -0,0 +1,47 @@ +{header} +<title>{repo|escape}: diff {file|escape}</title> +<link rel="alternate" type="application/rss+xml" + href="{url}rss-log" title="RSS feed for {repo|escape}"> +</head> +<body> + +<div class="page_header"> +<a href="http://www.selenic.com/mercurial/" title="Mercurial"><div style="float:right;">Mercurial</div></a><a href="{url}summary{getentries}">{repo|escape}</a> / annotate +</div> + +<div class="page_nav"> +<a href="{url}summary{getentries}">summary</a> | +<a href="{url}shortlog{getentries}">shortlog</a> | +<a href="{url}log{getentries}">changelog</a> | +<a href="{url}tags{getentries}">tags</a> | +<a href="{url}file/{node|short}{path|urlescape}{getentries}">manifest</a> | +<a href="{url}rev/{node|short}{getentries}">changeset</a> | +<a href="{url}file/{node|short}/{file|urlescape}{getentries}">file</a> | +<a href="{url}log/{node|short}/{file|urlescape}{getentries}">revisions</a> | +<a href="{url}annotate/{node|short}/{file|urlescape}{getantries}">annotate</a> | +diff | +<a href="{url}raw-diff/{node|short}/{file|urlescape}">raw</a><br/> +</div> + +<div class="title">{file|escape}</div> + +<table> +<tr> + <td class="metatag">changeset {rev}:</td> + <td><a href="{url}rev/{node|short}{getentries}">{node|short}</a></td> +</tr> +{parent%filediffparent} +{child%filediffchild} +<tr> + <td class="metatag">manifest:</td> + <td><a href="{url}file/{node|short}{getentries}">{node|short}</a></td> +</tr> +</table> + +<div class="page_body"> +<table> +{diff} +</table> +</div> + +{footer}
--- a/templates/gitweb/filelog.tmpl Wed Oct 11 23:31:05 2006 +0200 +++ b/templates/gitweb/filelog.tmpl Wed Oct 11 16:19:11 2006 -0700 @@ -17,6 +17,7 @@ <a href="{url}file/{node|short}/#file|urlescape#{getentries}">file</a> | revisions | <a href="{url}annotate/{node|short}/#file|urlescape#{getentries}">annotate</a> | +<a href="{url}diff/{node|short}/{file|urlescape}{getentries}">diff</a> | <a href="{url}rss-log/#node|short#/#file|urlescape#">rss</a><br/> </div>
--- a/templates/gitweb/filerevision.tmpl Wed Oct 11 23:31:05 2006 +0200 +++ b/templates/gitweb/filerevision.tmpl Wed Oct 11 16:19:11 2006 -0700 @@ -19,6 +19,7 @@ file | <a href="{url}log/{node|short}/#file|urlescape#{getentries}">revisions</a> | <a href="{url}annotate/{node|short}/#file|urlescape#{getentries}">annotate</a> | +<a href="{url}diff/{node|short}/{file|urlescape}{getentries}">diff</a> | <a href="{url}raw-file/{node|short}/#file|urlescape#">raw</a><br/> </div>
--- a/templates/gitweb/map Wed Oct 11 23:31:05 2006 +0200 +++ b/templates/gitweb/map Wed Oct 11 16:19:11 2006 -0700 @@ -8,7 +8,7 @@ naventry = '<a href="#url#log/#rev#{getentries}">#label|escape#</a> ' navshortentry = '<a href="#url#shortlog/#rev#{getentries}">#label|escape#</a> ' filedifflink = '<a href="#url#diff/#node|short#/#file|urlescape#{getentries}">#file|escape#</a> ' -filenodelink = '<tr class="parity#parity#"><td><a class="list" href="">#file|escape#</a></td><td></td><td class="link"><a href="#url#file/#node|short#/#file|urlescape#{getentries}">file</a> | <a href="#url#annotate/#node|short#/#file|urlescape#{getentries}">annotate</a> <!-- FIX ME | <a href="#url#diff/#node|short#/#file|urlescape#{getentries}">diff</a> --> | <a href="#url#log/#node|short#/#file|urlescape#{getentries}">revisions</a></td></tr>' +filenodelink = '<tr class="parity#parity#"><td><a class="list" href="">#file|escape#</a></td><td></td><td class="link"><a href="#url#file/#node|short#/#file|urlescape#{getentries}">file</a> | <a href="#url#annotate/#node|short#/#file|urlescape#{getentries}">annotate</a> | <a href="#url#diff/#node|short#/#file|urlescape#{getentries}">diff</a> | <a href="#url#log/#node|short#/#file|urlescape#{getentries}">revisions</a></td></tr>' fileellipses = '...' changelogentry = changelogentry.tmpl searchentry = changelogentry.tmpl @@ -18,6 +18,7 @@ manifestfileentry = '<tr class="parity#parity#"><td style="font-family:monospace">#permissions|permissions#</td><td style="font-family:monospace" align=right>#size#</td><td class="list"><a class="list" href="#url#file/#node|short#/#file|urlescape#{getentries}">#basename|escape#</a></td><td class="link"><a href="#url#file/#node|short#/#file|urlescape#{getentries}">file</a> | <a href="#url#log/#node|short#/#file|urlescape#{getentries}">revisions</a> | <a href="#url#annotate/#node|short#/#file|urlescape#{getentries}">annotate</a></td></tr>' filerevision = filerevision.tmpl fileannotate = fileannotate.tmpl +filediff = filediff.tmpl filelog = filelog.tmpl fileline = '<div style="font-family:monospace" class="parity#parity#"><pre><span class="linenr"> #linenumber#</span> #line|escape#</pre></div>' annotateline = '<tr style="font-family:monospace" class="parity#parity#"><td class="linenr" style="text-align: right;"><a href="#url#annotate/#node|short#/#file|urlescape#{getentries}">#author|obfuscate#@#rev#</a></td><td><pre>#line|escape#</pre></td></tr>'