changeset 1575:0a1cca912fda

[hgweb] gitweb style: File annotate converted, file revision made more like the deafault style Namespace polution prevention (manifest vs. tagmanifest - shouldn't be a problem yet) File annotate updated File revision now has commit info
author Josef "Jeff" Sipek <jeffpc@optonline.net>
date Mon, 05 Dec 2005 07:07:40 -0500
parents 32b091ce4026
children 145cc9f68c05
files mercurial/hgweb.py templates/fileannotate-gitweb.tmpl templates/filerevision-gitweb.tmpl templates/map-gitweb templates/tags-gitweb.tmpl
diffstat 5 files changed, 31 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb.py	Mon Dec 05 05:01:28 2005 -0500
+++ b/mercurial/hgweb.py	Mon Dec 05 07:07:40 2005 -0500
@@ -632,7 +632,7 @@
             for k,n in i:
                 yield {"parity": parity,
                        "tag": k,
-		       "manifest": hex(cl.read(n)[0]),
+		       "tagmanifest": hex(cl.read(n)[0]),
 		       "date": cl.read(n)[2],
                        "node": hex(n)}
                 parity = 1 - parity
@@ -668,7 +668,7 @@
                              tag = k,
                              node = hex(n),
                              date = t,
-                             manifest = hex(m))
+                             tagmanifest = hex(m))
                 parity = 1 - parity
         
         def changelist(**map):
--- a/templates/fileannotate-gitweb.tmpl	Mon Dec 05 05:01:28 2005 -0500
+++ b/templates/fileannotate-gitweb.tmpl	Mon Dec 05 07:07:40 2005 -0500
@@ -13,16 +13,16 @@
 <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=#path#;style=gitweb">manifest</a> | <a href="?cmd=changeset;node=#node#;style=gitweb">changeset</a> | <a href="?cmd=file;file=#file#;filenode=#filenode#;style=gitweb">file</a> | <a href="?cmd=filelog;file=#file#;filenode=#filenode#;style=gitweb">revisions</a> | annotate<br/>
 </div>
 
-<h2>Annotate #file# (#filenode|short#)</h2>
+<div class="title">#file#</div>
 
 <table>
 <tr>
  <td class="metatag">changeset #rev#:</td>
- <td><a href="?cmd=changeset;node=#node#;style=gitweb">#node|short#</a></td></tr>
+ <td><a href="?cs=#node|short#;style=gitweb">#node|short#</a></td></tr>
 #parent%fileannotateparent#
 <tr>
  <td class="metatag">manifest:</td>
- <td><a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">#manifest|short#</a></td></tr>
+ <td><a href="?mf=#manifest|short#;path=/;style=gitweb">#manifest|short#</a></td></tr>
 <tr>
  <td class="metatag">author:</td>
  <td>#author|obfuscate#</td></tr>
@@ -34,10 +34,10 @@
  <td>#permissions|permissions#</td></tr>
 </table>
 
-<br/>
-
-<table cellspacing="0" cellpadding="0">
+<div class="page_body">
+<table>
 #annotate%annotateline#
 </table>
+</div>
 
 #footer#
--- a/templates/filerevision-gitweb.tmpl	Mon Dec 05 05:01:28 2005 -0500
+++ b/templates/filerevision-gitweb.tmpl	Mon Dec 05 07:07:40 2005 -0500
@@ -14,6 +14,26 @@
 </div>
 
 <div class="title">#file#</div>
+
+<table>
+<tr>
+ <td class="metatag">changeset #rev#:</td>
+ <td><a href="?cs=#node|short#;style=gitweb">#node|short#</a></td></tr>
+#parent%fileannotateparent#
+<tr>
+ <td class="metatag">manifest:</td>
+ <td><a href="?mf=#manifest|short#;path=/;style=gitweb">#manifest|short#</a></td></tr>
+<tr>
+ <td class="metatag">author:</td>
+ <td>#author|obfuscate#</td></tr>
+<tr>
+ <td class="metatag">date:</td>
+ <td>#date|date# (#date|age# ago)</td></tr>
+<tr>
+ <td class="metatag">permissions:</td>
+ <td>#permissions|permissions#</td></tr>
+</table>
+
 <div class="page_body">
 #text%fileline#
 </div>
--- a/templates/map-gitweb	Mon Dec 05 05:01:28 2005 -0500
+++ b/templates/map-gitweb	Mon Dec 05 07:07:40 2005 -0500
@@ -22,7 +22,7 @@
 filelog = filelog-gitweb.tmpl
 fileline = "<div style="font-family:monospace; white-space: pre;" class="parity#parity#"><span class="linenr">   #linenumber#</span> #line|escape#</div>"
 filelogentry = filelogentry-gitweb.tmpl
-annotateline = "<tr class="parity#parity#"><td class="annotate"><a href="?cmd=changeset;node=#node#;style=gitweb">#author|obfuscate#@#rev#</a></td><td><pre>#line|escape#</pre></td></tr>"
+annotateline = "<tr style="font-family:monospace; white-space: pre;" class="parity#parity#"><td class="linenr" style="text-align: right;"><a href="?cs=#node|short#;style=gitweb">#author|obfuscate#@#rev#</a></td><td>#line|escape#</td></tr>"
 difflineplus = "<div class="pre" style="color:#008800;">#line|escape#</div>"
 difflineminus = "<div class="pre" style="color:#cc0000;">#line|escape#</div>"
 difflineat = "<div class="pre" style="color:#990099;">#line|escape#</div>"
@@ -32,7 +32,7 @@
 filerevparent = "<tr><td class="metatag">parent:</td><td><a href="?cmd=file;file=#file#;filenode=#node#;style=gitweb">#node|short#</a></td></tr>"
 fileannotateparent = "<tr><td class="metatag">parent:</td><td><a href="?cmd=annotate;file=#file#;filenode=#node#;style=gitweb">#node|short#</a></td></tr>"
 tags = tags-gitweb.tmpl
-tagentry = "<tr class="parity#parity#"><td><i>#date|age# ago</i></td><td><a class="list" href="?cmd=changeset;node=#node|short#;style=gitweb"><b>#tag#</b></a></td><td class="link"><a href="?cmd=changeset;node=#node|short#;style=gitweb">changeset</a> | <a href="?cmd=changelog;rev=#node|short#;style=gitweb">changelog</a> |  <a href="?mf=#manifest|short#;path=/;style=gitweb">manifest</a></td></tr>"
+tagentry = "<tr class="parity#parity#"><td><i>#date|age# ago</i></td><td><a class="list" href="?cmd=changeset;node=#node|short#;style=gitweb"><b>#tag#</b></a></td><td class="link"><a href="?cmd=changeset;node=#node|short#;style=gitweb">changeset</a> | <a href="?cmd=changelog;rev=#node|short#;style=gitweb">changelog</a> |  <a href="?mf=#tagmanifest|short#;path=/;style=gitweb">manifest</a></td></tr>"
 diffblock = "#lines#"
 changelogtag = "<tr><th class="tag">tag:</th><td class="tag">#tag#</td></tr>"
 changesettag = "<tr><td>tag</td><td>#tag#</td></tr>"
--- a/templates/tags-gitweb.tmpl	Mon Dec 05 05:01:28 2005 -0500
+++ b/templates/tags-gitweb.tmpl	Mon Dec 05 07:07:40 2005 -0500
@@ -10,7 +10,7 @@
 </div>
 
 <div class="page_nav">
-<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;rev=#rev#;style=gitweb">changelog</a> | tags | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a>
+<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | tags | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a>
 <br/>
 </div>