changeset 975:bdd7c53fca00

hgweb: Changed changelog page to list format syntax
author Josef "Jeff" Sipek <jeffpc@optonline.net>
date Wed, 17 Aug 2005 21:45:44 -0500
parents aedb47764f29
children 5d5ab159d197
files mercurial/hgweb.py templates/changelog.tmpl
diffstat 2 files changed, 18 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb.py	Wed Aug 17 21:14:20 2005 -0500
+++ b/mercurial/hgweb.py	Wed Aug 17 21:45:44 2005 -0500
@@ -252,12 +252,12 @@
                 if pos + f < count: l.append(("+" + r, pos + f))
                 if pos - f >= 0: l.insert(0, ("-" + r, pos - f))
 
-            yield self.t("naventry", rev = 0, label="(0)")
+            yield {"rev": 0, "label": "(0)"}
 
             for label, rev in l:
-                yield self.t("naventry", label = label, rev = rev)
+                yield {"label": label, "rev": rev}
 
-            yield self.t("naventry", label="tip")
+            yield {"label": "tip", "rev": ""}
 
         def changelist(**map):
             parity = (start - end) & 1
@@ -269,22 +269,21 @@
                 hn = hex(n)
                 t = float(changes[2].split(' ')[0])
 
-                l.insert(0, self.t(
-                    'changelogentry',
-                    parity = parity,
-                    author = changes[1],
-                    parent = self.parents("changelogparent",
+                l.insert(0, {
+                    "parity": parity,
+                    "author": changes[1],
+                    "parent": self.parents("changelogparent",
                                           cl.parents(n), cl.rev),
-                    changelogtag = self.showtag("changelogtag",n),
-                    manifest = hex(changes[0]),
-                    desc = changes[4],
-                    date = t,
-                    files = self.listfilediffs(changes[3], n),
-                    rev = i,
-                    node = hn))
+                    "changelogtag": self.showtag("changelogtag",n),
+                    "manifest": hex(changes[0]),
+                    "desc": changes[4],
+                    "date": t,
+                    "files": self.listfilediffs(changes[3], n),
+                    "rev": i,
+                    "node": hn})
                 parity = 1 - parity
 
-            yield l
+            for e in l: yield e
 
         cl = self.repo.changelog
         mf = cl.read(cl.tip())[0]
--- a/templates/changelog.tmpl	Wed Aug 17 21:14:20 2005 -0500
+++ b/templates/changelog.tmpl	Wed Aug 17 21:45:44 2005 -0500
@@ -18,18 +18,18 @@
 <label for="search1">search:</label>
 <input type="hidden" name="cmd" value="changelog">
 <input name="rev" id="search1" type="text" size="30">
-navigate: <small>#changenav#</small>
+navigate: <small>#changenav%naventry#</small>
 </p>
 </form>
 
-#entries#
+#entries%changelogentry#
 
 <form action="#">
 <p>
 <label for="search2">search:</label>
 <input type="hidden" name="cmd" value="changelog">
 <input name="rev" id="search2" type="text" size="30">
-navigate: <small>#changenav#</small>
+navigate: <small>#changenav%naventry#</small>
 </p>
 </form>