Patchwork [V2] hgweb: add changelog and search templates to raw style

login
register
mail settings
Submitter Alexander Plavin
Date July 13, 2013, 10:26 a.m.
Message ID <7ff1033f1c12808734cd.1373711197@debian-alexander.dolgopa>
Download mbox | patch
Permalink /patch/1856/
State Accepted
Commit c8490dcc5fb3c0da8fe713c07533471752550a7d
Headers show

Comments

Alexander Plavin - July 13, 2013, 10:26 a.m.
# HG changeset patch
# User Alexander Plavin <me@aplavin.ru>
# Date 1373321304 -14400
#      Tue Jul 09 02:08:24 2013 +0400
# Node ID 7ff1033f1c12808734cd3194e5053ed3d2ec2959
# Parent  3f19e6106f17298dca51f3d3f3234590af518f4b
hgweb: add changelog and search templates to raw style

This will make testing hgweb search and other things simpler and more concise,
as there is no extra HTML code in the raw style.

Patch

diff -r 3f19e6106f17 -r 7ff1033f1c12 mercurial/templates/raw/changelog.tmpl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/raw/changelog.tmpl	Tue Jul 09 02:08:24 2013 +0400
@@ -0,0 +1,5 @@ 
+{header}
+# HG shortlog
+# Node ID {node}
+
+{entries%changelogentry}
diff -r 3f19e6106f17 -r 7ff1033f1c12 mercurial/templates/raw/logentry.tmpl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/raw/logentry.tmpl	Tue Jul 09 02:08:24 2013 +0400
@@ -0,0 +1,6 @@ 
+changeset:   {node}
+revision:    {rev}
+user:        {author}
+date:        {date|rfc822date}
+summary:     {desc}
+{branches%branchname}{tags%tagname}{bookmarks%bookmarkname}
diff -r 3f19e6106f17 -r 7ff1033f1c12 mercurial/templates/raw/map
--- a/mercurial/templates/raw/map	Sat Jul 13 00:57:56 2013 +0400
+++ b/mercurial/templates/raw/map	Tue Jul 09 02:08:24 2013 +0400
@@ -1,5 +1,9 @@ 
 default = 'shortlog'
 shortlog = "'raw' is not a browsable style"
+changelog = changelog.tmpl
+changelogentry = logentry.tmpl
+search = search.tmpl
+searchentry = logentry.tmpl
 mimetype = 'text/plain; charset={encoding}'
 header = ''
 footer = ''
diff -r 3f19e6106f17 -r 7ff1033f1c12 mercurial/templates/raw/search.tmpl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/raw/search.tmpl	Tue Jul 09 02:08:24 2013 +0400
@@ -0,0 +1,6 @@ 
+{header}
+# HG changesets search
+# Node ID {node}
+# Query "{query}"
+
+{entries%changelogentry}