Matthew Marshall avatar Matthew Marshall committed ce8229a

Started work on integrating repo pages.

Comments (0)

Files changed (26)

hgtemplates/freehg/aftertitle.html

+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for #repo|escape#">
+<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">#repo|escape#</a> / shortlog
+</div>

hgtemplates/freehg/changelog.tmpl

+#header#
+<title>#repo|escape#: Changelog</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for #repo|escape#">
+<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{sessionvars%urlparameter}">#repo|escape#</a> / changelog
+</div>
+
+<form action="{url}log">
+{sessionvars%hiddenformentry}
+<div class="search">
+<input type="text" name="rev"  />
+</div>
+</form>
+</div>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> | <a href="{url}shortlog/#rev#{sessionvars%urlparameter}">shortlog</a> | changelog | <a href="{url}tags{sessionvars%urlparameter}">tags</a> | <a href="{url}file/#node|short#{sessionvars%urlparameter}">manifest</a>#archives%archiveentry#
+<br/>
+#changenav%naventry#<br/>
+</div>
+
+#entries%changelogentry#
+
+<div class="page_nav">
+#changenav%naventry#<br/>
+</div>
+
+#footer#

hgtemplates/freehg/changelogentry.tmpl

+<div>
+<a class="title" href="{url}rev/#node|short#{sessionvars%urlparameter}"><span class="age">#date|age# ago</span>#desc|strip|firstline|escape#<span class="logtags"> {branches%branchtag}{tags%tagtag}</span></a>
+</div>
+<div class="title_text">
+<div class="log_link">
+<a href="{url}rev/#node|short#{sessionvars%urlparameter}">changeset</a><br/>
+</div>
+<i>#author|obfuscate# [#date|rfc822date#] rev #rev#</i><br/>
+</div>
+<div class="log_body">
+#desc|strip|escape|addbreaks#
+<br/>
+<br/>
+</div>

hgtemplates/freehg/changeset.tmpl

+#header#
+<title>{repo|escape}: changeset {rev}:{node|short}</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for #repo|escape#">
+<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{sessionvars%urlparameter}">#repo|escape#</a> / changeset
+</div>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> | <a href="{url}shortlog/#rev#{sessionvars%urlparameter}">shortlog</a> | <a href="{url}log/#rev#{sessionvars%urlparameter}">changelog</a> | <a href="{url}tags{sessionvars%urlparameter}">tags</a> | <a href="{url}file/#node|short#{sessionvars%urlparameter}">manifest</a> | changeset | <a href="{url}raw-rev/#node|short#">raw</a> #archives%archiveentry#<br/>
+</div>
+
+<div>
+<a class="title" href="{url}raw-rev/#node|short#">#desc|strip|escape|firstline# <span class="logtags">{branches%branchtag}{tags%tagtag}</span></a>
+</div>
+<div class="title_text">
+<table cellspacing="0">
+<tr><td>author</td><td>#author|obfuscate#</td></tr>
+<tr><td></td><td>#date|date# (#date|age# ago)</td></tr>
+<tr><td>changeset {rev}</td><td style="font-family:monospace">{node|short}</td></tr>
+#parent%changesetparent#
+#child%changesetchild#
+</table></div>
+
+<div class="page_body">
+#desc|strip|escape|addbreaks#
+</div>
+<div class="list_head"></div>
+<div class="title_text">
+<table cellspacing="0">
+#files#
+</table></div>
+
+<div class="page_body">#diff#</div>
+
+#footer#

hgtemplates/freehg/error.tmpl

+#header#
+<title>#repo|escape#: Error</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for #repo|escape#">
+<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{sessionvars%urlparameter}">#repo|escape#</a> / error
+</div>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> | <a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> | <a href="{url}log{sessionvars%urlparameter}">changelog</a> | <a href="{url}tags{sessionvars%urlparameter}">tags</a> | <a href="{url}file/#node|short#{sessionvars%urlparameter}">manifest</a><br/>
+</div>
+
+<div class="page_body">
+<br/>
+<i>An error occured while processing your request</i><br/>
+<br/>
+{error|escape}
+</div>
+
+#footer#

hgtemplates/freehg/fileannotate.tmpl

+#header#
+<title>{repo|escape}: {file|escape}@{node|short} (annotated)</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for #repo|escape#">
+<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{sessionvars%urlparameter}">#repo|escape#</a> / annotate
+</div>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
+<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
+<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
+<a href="{url}file/#node|short##path|urlescape#{sessionvars%urlparameter}">manifest</a> |
+<a href="{url}rev/#node|short#{sessionvars%urlparameter}">changeset</a> |
+<a href="{url}file/{node|short}/#file|urlescape#{sessionvars%urlparameter}">file</a> |
+<a href="{url}log/{node|short}/#file|urlescape#{sessionvars%urlparameter}">revisions</a> |
+annotate |
+<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
+<a href="{url}raw-annotate/{node|short}/#file|urlescape#">raw</a><br/>
+</div>
+
+<div class="title">#file|escape#</div>
+
+<div class="title_text">
+<table cellspacing="0">
+<tr>
+ <td>author</td>
+ <td>#author|obfuscate#</td></tr>
+<tr>
+ <td></td>
+ <td>#date|date# (#date|age# ago)</td></tr>
+<tr>
+ <td>changeset {rev}</td>
+ <td style="font-family:monospace"><a class="list" href="{url}rev/#node|short#{sessionvars%urlparameter}">#node|short#</a></td></tr>
+#parent%fileannotateparent#
+#child%fileannotatechild#
+<tr>
+ <td>permissions</td>
+ <td style="font-family:monospace">#permissions|permissions#</td></tr>
+</table>
+</div>
+
+<div class="page_path">
+{desc|strip|escape|addbreaks}
+</div>
+<div class="page_body">
+<table>
+#annotate%annotateline#
+</table>
+</div>
+
+#footer#

hgtemplates/freehg/filediff.tmpl

+{header}
+<title>{repo|escape}: diff {file|escape}</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for #repo|escape#">
+<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{sessionvars%urlparameter}">{repo|escape}</a> / diff
+</div>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
+<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
+<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
+<a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">manifest</a> |
+<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
+<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
+<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> |
+<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">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>changeset {rev}</td>
+ <td style="font-family:monospace"><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>
+{parent%filediffparent}
+{child%filediffchild}
+</table>
+
+<div class="list_head"></div>
+
+<div class="page_body">
+{diff}
+</div>
+
+{footer}

hgtemplates/freehg/filelog.tmpl

+#header#
+<title>#repo|escape#: File revisions</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for #repo|escape#">
+<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{sessionvars%urlparameter}">#repo|escape#</a> / file revisions
+</div>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
+<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
+<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
+<a href="{url}file/{node|short}/#file|urlescape#{sessionvars%urlparameter}">file</a> |
+revisions |
+<a href="{url}annotate/{node|short}/#file|urlescape#{sessionvars%urlparameter}">annotate</a> |
+<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
+<a href="{url}rss-log/#node|short#/#file|urlescape#">rss</a>
+<br/>
+{nav%filenaventry}
+</div>
+
+<div class="title" >#file|urlescape#</div>
+
+<table>
+#entries%filelogentry#
+</table>
+
+<div class="page_nav">
+{nav%filenaventry}
+</div>
+
+#footer#

hgtemplates/freehg/filerevision.tmpl

+#header#
+<title>{repo|escape}: {file|escape}@{node|short}</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for #repo|escape#">
+<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{sessionvars%urlparameter}">#repo|escape#</a> / file revision
+</div>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
+<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
+<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
+<a href="{url}file/#node|short##path|urlescape#{sessionvars%urlparameter}">manifest</a> |
+<a href="{url}rev/#node|short#{sessionvars%urlparameter}">changeset</a> |
+file |
+<a href="{url}log/{node|short}/#file|urlescape#{sessionvars%urlparameter}">revisions</a> |
+<a href="{url}annotate/{node|short}/#file|urlescape#{sessionvars%urlparameter}">annotate</a> |
+<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
+<a href="{url}raw-file/{node|short}/#file|urlescape#">raw</a><br/>
+</div>
+
+<div class="title">#file|escape#</div>
+
+<div class="title_text">
+<table cellspacing="0">
+<tr>
+ <td>author</td>
+ <td>#author|obfuscate#</td></tr>
+<tr>
+ <td></td>
+ <td>#date|date# (#date|age# ago)</td></tr>
+<tr>
+ <td>changeset {rev}</td>
+ <td style="font-family:monospace"><a class="list" href="{url}rev/#node|short#{sessionvars%urlparameter}">#node|short#</a></td></tr>
+#parent%filerevparent#
+#child%filerevchild#
+<tr>
+ <td>permissions</td>
+ <td style="font-family:monospace">#permissions|permissions#</td></tr>
+</table>
+</div>
+
+<div class="page_path">
+{desc|strip|escape|addbreaks}
+</div>
+
+<div class="page_body">
+#text%fileline#
+</div>
+
+#footer#

hgtemplates/freehg/footer.tmpl

+        <div class="span-20 last footer">
+            Site copyright 2008 by <a href="http://matthewmarshall.org/contact/">Matthew Marshall</a>. | <a href="/about/">About</a> | <a href="/tos/">Terms of Service</a>
+        </div>
+#motd#
+    </div>
+</body>
+</html>

hgtemplates/freehg/header.tmpl

+Content-type: text/html; charset={encoding}
+
+<?xml version="1.0" encoding="{encoding}"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
+<head>
+<link rel="icon" href="{staticurl}hgicon.png" type="image/png">
+<meta name="robots" content="index, nofollow"/>
+<link rel="stylesheet" href="/static/freehg.css" type="text/css" />
+

hgtemplates/freehg/index.tmpl

+#header#
+<title>Mercurial repositories index</title>
+</head>
+<body>
+
+<div class="page_header">
+<a href="http://www.selenic.com/mercurial/" title="Mercurial"><div style="float:right;">Mercurial</div></a>Repositories list
+</div>
+
+<table cellspacing="0">
+    <tr>
+        <td><a href="?sort=#sort_name#">Name</a></td>
+        <td><a href="?sort=#sort_description#">Description</a></td>
+        <td><a href="?sort=#sort_contact#">Contact</a></td>
+        <td><a href="?sort=#sort_lastchange#">Last change</a></td>
+        <td>&nbsp;</td>
+        <td>&nbsp;</td>
+    <tr>
+    #entries%indexentry#
+</table>
+<div class="page_footer">
+#motd#
+</div>
+</body>
+</html>

hgtemplates/freehg/manifest.tmpl

+#header#
+<title>#repo|escape#: Manifest</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for #repo|escape#">
+<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{sessionvars%urlparameter}">#repo|escape#</a> / manifest
+</div>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
+<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
+<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
+manifest |
+<a href="{url}rev/#node|short#{sessionvars%urlparameter}">changeset</a> #archives%archiveentry#<br/>
+</div>
+
+<div class="title">#path|escape# <span class="logtags">{branches%branchtag}{tags%tagtag}</span></div>
+<table cellspacing="0">
+<tr class="parity#upparity#">
+<td style="font-family:monospace">drwxr-xr-x</td>
+<td style="font-family:monospace"></td>
+<td style="font-family:monospace"></td>
+<td><a href="{url}file/#node|short##up|urlescape#{sessionvars%urlparameter}">[up]</a></td>
+<td class="link">&nbsp;</td>
+</tr>
+#dentries%manifestdirentry#
+#fentries%manifestfileentry#
+</table>
+
+#footer#

hgtemplates/freehg/map

+default = 'summary'
+header = header.tmpl
+footer = footer.tmpl
+search = search.tmpl
+changelog = changelog.tmpl
+summary = summary.tmpl
+error = error.tmpl
+notfound = notfound.tmpl
+aftertitle = aftertitle.html
+naventry = '<a href="{url}log/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
+navshortentry = '<a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
+filenaventry = '<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a> '
+filedifflink = '<a href="#url#diff/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#file|escape#</a> '
+filenodelink = '<tr class="parity#parity#"><td><a class="list" href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">#file|escape#</a></td><td></td><td class="link"><a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">file</a> | <a href="#url#annotate/#node|short#/#file|urlescape#{sessionvars%urlparameter}">annotate</a> | <a href="#url#diff/#node|short#/#file|urlescape#{sessionvars%urlparameter}">diff</a> | <a href="#url#log/#node|short#/#file|urlescape#{sessionvars%urlparameter}">revisions</a></td></tr>'
+fileellipses = '...'
+changelogentry = changelogentry.tmpl
+searchentry = changelogentry.tmpl
+changeset = changeset.tmpl
+manifest = manifest.tmpl
+manifestdirentry = '<tr class="parity#parity#"><td style="font-family:monospace">drwxr-xr-x</td><td style="font-family:monospace"></td><td style="font-family:monospace"></td><td><a href="#url#file/#node|short##path|urlescape#{sessionvars%urlparameter}">#basename|escape#</a></td><td class="link"><a href="#url#file/#node|short##path|urlescape#{sessionvars%urlparameter}">manifest</a></td></tr>'
+manifestfileentry = '<tr class="parity#parity#"><td style="font-family:monospace">#permissions|permissions#</td><td style="font-family:monospace" align=right>#date|isodate#</td><td style="font-family:monospace" align=right>#size#</td><td class="list"><a class="list" href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">#basename|escape#</a></td><td class="link"><a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">file</a> | <a href="#url#log/#node|short#/#file|urlescape#{sessionvars%urlparameter}">revisions</a> | <a href="#url#annotate/#node|short#/#file|urlescape#{sessionvars%urlparameter}">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#{sessionvars%urlparameter}">#author|obfuscate#@#rev#</a></td><td><pre>#line|escape#</pre></td></tr>'
+difflineplus = '<div style="color:#008800;">#line|escape#</div>'
+difflineminus = '<div style="color:#cc0000;">#line|escape#</div>'
+difflineat = '<div style="color:#990099;">#line|escape#</div>'
+diffline = '<div>#line|escape#</div>'
+changelogparent = '<tr><th class="parent">parent #rev#:</th><td class="parent"><a href="#url#rev/#node|short#{sessionvars%urlparameter}">#node|short#</a></td></tr>'
+changesetparent = '<tr><td>parent {rev}</td><td style="font-family:monospace"><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>'
+filerevparent = '<tr><td>parent {rev}</td><td style="font-family:monospace"><a class="list" href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rename%filerename}{node|short}</a></td></tr>'
+filerename = '{file|escape}@'
+filelogrename = '| <a href="{url}file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">base</a>'
+fileannotateparent = '<tr><td>parent {rev}</td><td style="font-family:monospace"><a class="list" href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rename%filerename}{node|short}</a></td></tr>'
+changelogchild = '<tr><th class="child">child #rev#:</th><td class="child"><a href="{url}rev/#node|short#{sessionvars%urlparameter}">#node|short#</a></td></tr>'
+changesetchild = '<tr><td>child {rev}</td><td style="font-family:monospace"><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>'
+filerevchild = '<tr><td>child {rev}</td><td style="font-family:monospace"><a class="list" href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td></tr>'
+fileannotatechild = '<tr><td>child {rev}</td><td style="font-family:monospace"><a class="list" href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td></tr>'
+tags = tags.tmpl
+tagentry = '<tr class="parity#parity#"><td class="age"><i>#date|age# ago</i></td><td><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}"><b>#tag|escape#</b></a></td><td class="link"><a href="{url}rev/#node|short#{sessionvars%urlparameter}">changeset</a> | <a href="{url}log/#node|short#{sessionvars%urlparameter}">changelog</a> | <a href="{url}file/#node|short#{sessionvars%urlparameter}">manifest</a></td></tr>'
+branchentry = '<tr class="parity{parity}"><td class="age"><i>{date|age} ago</i></td><td><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}"><b>{node|short}</b></td><td>{branch|escape}</td><td class="link"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> | <a href="{url}log/{node|short}{sessionvars%urlparameter}">changelog</a> | <a href="{url}file/{node|short}{sessionvars%urlparameter}">manifest</a></td></tr>'
+diffblock = '<pre>#lines#</pre>'
+filediffparent = '<tr><td>parent {rev}</td><td style="font-family:monospace"><a class="list" href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td></tr>'
+filelogparent = '<tr><td align="right">parent #rev#:&nbsp;</td><td><a href="{url}file/{node|short}/#file|urlescape#{sessionvars%urlparameter}">#node|short#</a></td></tr>'
+filediffchild = '<tr><td>child {rev}</td><td style="font-family:monospace"><a class="list" href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td></tr>'
+filelogchild = '<tr><td align="right">child #rev#:&nbsp;</td><td><a href="{url}file{node|short}/#file|urlescape#{sessionvars%urlparameter}">#node|short#</a></td></tr>'
+shortlog = shortlog.tmpl
+tagtag = '<span class="tagtag" title="{name}">{name}</span> '
+branchtag = '<span class="branchtag" title="{name}">{name}</span> '
+shortlogentry = '<tr class="parity#parity#"><td class="age"><i>#date|age# ago</i></td><td><i>#author|person#</i></td><td><a class="list" href="{url}rev/#node|short#{sessionvars%urlparameter}"><b>#desc|strip|firstline|escape#</b> <span class="logtags">{branches%branchtag}{tags%tagtag}</span></a></td><td class="link" nowrap><a href="{url}rev/#node|short#{sessionvars%urlparameter}">changeset</a> | <a href="{url}file/#node|short#{sessionvars%urlparameter}">manifest</a></td></tr>'
+filelogentry = '<tr class="parity#parity#"><td class="age"><i>#date|age# ago</i></td><td><a class="list" href="{url}rev/#node|short#{sessionvars%urlparameter}"><b>#desc|strip|firstline|escape#</b></a></td><td class="link"><a href="{url}file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">file</a>&nbsp;|&nbsp;<a href="{url}diff/#node|short#/#file|urlescape#{sessionvars%urlparameter}">diff</a>&nbsp;|&nbsp;<a href="{url}annotate/#node|short#/#file|urlescape#{sessionvars%urlparameter}">annotate</a> #rename%filelogrename#</td></tr>'
+archiveentry = ' | <a href="{url}archive/{node|short}{extension}">#type|escape#</a> '
+indexentry = '<tr class="parity#parity#"><td><a class="list" href="#url#{sessionvars%urlparameter}"><b>#name|escape#</b></a></td><td>#description#</td><td>#contact|obfuscate#</td><td class="age">#lastchange|age# ago</td><td class="indexlinks">#archives%archiveentry#</td><td><a class="rss_logo" href="#url#rss-log">RSS</a> <a class="rss_logo" href="#url#atom-log">Atom</a></td></tr>'
+index = index.tmpl
+urlparameter = '#separator##name#=#value|urlescape#'
+hiddenformentry = '<input type="hidden" name="#name#" value="#value|escape#" />'

hgtemplates/freehg/notfound.tmpl

+{header}
+<title>Mercurial repositories index</title>
+</head>
+
+<body>
+
+<div class="page_header">
+<a href="http://www.selenic.com/mercurial/" title="Mercurial"><div
+  style="float:right;">Mercurial</div></a> Not found: {repo|escape}
+</div>
+
+<div class="page_body">
+The specified repository "{repo|escape}" is unknown, sorry.
+<br/>
+<br/>
+Please go back to the <a href="/">main repository list page</a>.
+</div>
+
+{footer}

hgtemplates/freehg/search.tmpl

+#header#
+<title>#repo|escape#: Search</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for #repo|escape#">
+<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{sessionvars%urlparameter}">#repo|escape#</a> / search
+
+<form action="{url}log">
+{sessionvars%hiddenformentry}
+<div class="search">
+<input type="text" name="rev" value="#query|escape#" />
+</div>
+</form>
+</div>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
+<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
+<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
+<a href="{url}file/#node|short#{sessionvars%urlparameter}">manifest</a>#archives%archiveentry#
+<br/>
+</div>
+
+<div class="title">searching for #query|escape#</div>
+
+#entries#
+
+#footer#

hgtemplates/freehg/shortlog.tmpl

+#header#
+<title>#repo|escape#: Shortlog - freeHg.org</title>
+{aftertitle}
+
+<form action="{url}log">
+{sessionvars%hiddenformentry}
+<div class="search">
+<input type="text" name="rev"  />
+</div>
+</form>
+</div>
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
+shortlog |
+<a href="{url}log/#rev#{sessionvars%urlparameter}">changelog</a> |
+<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
+<a href="{url}file/#node|short#{sessionvars%urlparameter}">manifest</a>#archives%archiveentry#
+<br/>
+#changenav%navshortentry#<br/>
+</div>
+
+<div class="title">&nbsp;</div>
+<table cellspacing="0">
+#entries%shortlogentry#
+</table>
+
+<div class="page_nav">
+#changenav%navshortentry#
+</div>
+
+#footer#

hgtemplates/freehg/summary.tmpl

+<!--#header#
+<title>#repo|escape#: Summary</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for #repo|escape#">
+<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{sessionvars%urlparameter}">#repo|escape#</a> / summary
+-->
+<form action="{url}log">
+{sessionvars%hiddenformentry}
+<div class="search">
+<input type="text" name="rev"  />
+</div>
+</form>
+</div>
+
+<div class="page_nav">
+summary |
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
+<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
+<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
+<a href="{url}file/#node|short#{sessionvars%urlparameter}">manifest</a>#archives%archiveentry#
+<br/>
+</div>
+
+<div class="title">&nbsp;</div>
+<table cellspacing="0">
+<tr><td>description</td><td>#desc#</td></tr>
+<tr><td>owner</td><td>#owner|escape#</td></tr>
+<tr><td>last change</td><td>#lastchange|rfc822date#</td></tr>
+</table>
+
+<div><a  class="title" href="{url}shortlog{sessionvars%urlparameter}">changes</a></div>
+<table cellspacing="0">
+#shortlog#
+<tr class="light"><td colspan="4"><a class="list" href="{url}shortlog{sessionvars%urlparameter}">...</a></td></tr>
+</table>
+
+<div><a class="title" href="{url}tags{sessionvars%urlparameter}">tags</a></div>
+<table cellspacing="0">
+#tags#
+<tr class="light"><td colspan="3"><a class="list" href="{url}tags{sessionvars%urlparameter}">...</a></td></tr>
+</table>
+
+<div><a class="title" href="#">branches</a></div>
+<table cellspacing="0">
+{branches%branchentry}
+<tr class="light">
+  <td colspan="4"><a class="list"  href="#">...</a></td>
+</tr>
+</table>
+<!--#footer#-->

hgtemplates/freehg/tags.tmpl

+#header#
+<title>#repo|escape#: Tags</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for #repo|escape#">
+<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{sessionvars%urlparameter}">#repo|escape#</a> / tags
+</div>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
+<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
+tags |
+<a href="{url}file/#node|short#{sessionvars%urlparameter}">manifest</a>
+<br/>
+</div>
+
+<div class="title">&nbsp;</div>
+<table cellspacing="0">
+#entries%tagentry#
+</table>
+
+#footer#
 RewriteRule ^.*$ - [L]
 
 RewriteRule ^(hgfcgi/dispatch\.fcgi/.*)$ - [L]
-RewriteRule ^u/(\w+)/(.*)$ hgfcgi/dispatch.fcgi/u/$1/$2 [L]
+RewriteRule ^u/(\w+)/(\w+)/(.+)$ hgfcgi/dispatch.fcgi/u/$1/$2/$3 [L]
 
 RewriteRule ^(dispatch\.fcgi/.*)$ - [L]
 RewriteRule ^(.*)$ dispatch.fcgi/$1 [L]

htdocs/static/freehg.css

+html, body {margin:0;padding:0;background:#aaa url("/static/bg.png") top center repeat-y;}
+ul.errorlist {
+background:#FBE3E4 none repeat scroll 0%;
+border-color:#FBC2C4;
+color:#8A1F11;
+border:2px solid #DDDDDD;
+margin:0px;
+padding-left:2em;}
+
+#login-info {float:left; margin-left:120px; margin-top:20px; color:#ddd;}
+#login-info a {color:#088;}
+
+div.align-form label {float:left;min-width:120px;}
+div.align-form input {}
+div.align-form p, div.align-form ul.errorlist {clear:both;}
+
+.help-text {color:#666666;font-style:italic;}
+fieldset {border:0; background-color:#ccc;}
+legend {background-color:#ccc;padding:0 10px;}
+
+input.short {width:220px;padding:5px;}
+textarea {height:100px;}
+.form-row p {margin:0pt 0pt 1em;}
+
+#header {background:url("/static/header.png") repeat-x;}
+#logo {margin-left:37px; border:0;}
+.footer {text-align:center; padding:20px 30px 0 0;}
+
+.about {padding:10px 20px;}
             f.write("name = %s\n" % escape(self.name))
         if self.description:
             f.write("description = %s\n" %
-                linebreaks(urlize(escape(self.description))).replace('\n','').replace('%', '%%'))
+                self.get_html_description().replace('\n','').replace('%', '%%'))
         f.close()
 
+    def get_html_description(self):
+        return linebreaks(urlize(escape(self.description)))
+
+    def get_long_name(self):
+        if self.long_name:
+            return self.long_name
+        else:
+            return self.name
+
+    def __unicode__(self):
+        return self.name
+
 def save_repo(instance):
     repo = instance
     if not os.path.exists(repo.file_path):
 
 from freehg.repos.forms import NewRepoForm, NewAccountForm, LoginForm
 
+from mercurial import hg, ui, util
+from binascii import hexlify, unhexlify
+
+rfc822date = lambda x: util.datestr(x, "%a, %d %b %Y %H:%M:%S")
+
 def frontpage(request):
+    print type(request)
     if request.POST.get('reponame', False):
         repo_form = NewRepoForm(request.POST)
     else:
             login_form=login_form,
         ), context_instance=RequestContext(request)
     )
+
+def summary(request, username, reponame):
+    repo = get_object_or_404(Repo, name=reponame, owner__username=username)
+    hgrepo = hg.repository(ui.ui(), repo.file_path)
+    from mercurial.hgweb.hgweb_mod import hgweb
+    from mercurial.hgweb.common import style_map
+    from mercurial import templater
+    from django.conf import settings
+    web = hgweb(hgrepo, name=repo.get_long_name())
+    web.refresh()
+    def motd(**map):
+        yield web.config("web", "motd", "")
+    templatepath = settings.HG_TEMPLATE_PATH
+    mapfile = mapfile = style_map(templatepath, "freehg")
+    web.t = templater.templater(mapfile, templater.common_filters,
+                                     defaults={"url": request.build_absolute_uri(),
+                                               "staticurl": "/static/",
+                                               "urlbase": "/",
+                                               "repo": repo.get_long_name(),
+                                               "header": "",
+                                               "footer": "",
+                                               "motd": motd,
+                                               "rawfileheader": "FIXME",
+                                               "sessionvars": tuple(),
+                                               })
+    from cStringIO import StringIO
+    content = []
+    def write(*things):
+        for thing in things:
+            if hasattr(thing, "__iter__"):
+                for part in thing:
+                    write(part)
+            else:
+                content.append(unicode(thing))
+    write(web.summary())
+
+    return render_to_response('repos/summary.html',
+        dict(
+            repo=repo,
+            content=u''.join(content),
+        ), context_instance=RequestContext(request)
+    )

templates/base.html

 <link rel="stylesheet" href="/static/blueprint/screen.css" type="text/css" media="screen, projection" />
 <link rel="stylesheet" href="/static/blueprint/print.css" type="text/css" media="print" />
 <!--[if IE]><link rel="stylesheet" href="/static/blueprint/ie.css" type="text/css" media="screen, projection" /><![endif]-->
+<link rel="stylesheet" href="/static/freehg.css" type="text/css" />
 <script src="/static/jquery-1.2.3.js" type="text/javascript"></script>
 
-<style type="text/css">
-html, body {margin:0;padding:0;background:#aaa url("/static/bg.png") top center repeat-y;}
-ul.errorlist {
-background:#FBE3E4 none repeat scroll 0%;
-border-color:#FBC2C4;
-color:#8A1F11;
-border:2px solid #DDDDDD;
-margin:0px;
-padding-left:2em;}
-
-#login-info {float:left; margin-left:120px; margin-top:20px; color:#ddd;}
-#login-info a {color:#088;}
-
-div.align-form label {float:left;min-width:120px;}
-div.align-form input {}
-div.align-form p, div.align-form ul.errorlist {clear:both;}
-
-.help-text {color:#666666;font-style:italic;}
-fieldset {border:0; background-color:#ccc;}
-legend {background-color:#ccc;padding:0 10px;}
-
-input.short {width:220px;padding:5px;}
-textarea {height:100px;}
-.form-row p {margin:0pt 0pt 1em;}
-
-#header {background:url("/static/header.png") repeat-x;}
-#logo {margin-left:37px; border:0;}
-.footer {text-align:center; padding:20px 30px 0 0;}
-
-.about {padding:10px 20px;}
-</style>
-
-
 
 </head>
 <body>

templates/repos/summary.html

+{% extends "base.html" %}
+
+{% block title %}{{repo.get_long_name}} summary{% endblock %}
+
+{% block content %}
+{{content|safe}}
+{% comment %}<div class="page-nav">
+summary |
+<a href="{{repo.get_absolute_url}}shortlog/">shortlog</a> |
+<a href="{{repo.get_absolute_url}}log/">changelog</a> |
+<a href="{{repo.get_absolute_url}}tags/">tags</a> |
+<a href="{{repo.get_absolute_url}}file/{{tip_hex}}/">manifest</a>
+<br/>
+</div>
+
+<div class="repo-info">
+    <dl>
+        {% if repo.description %}
+        <dt>Description:</dt>
+            <dd>{{repo.get_html_description|safe}}</dd>
+        {% endif %}
+        <dt>Owner:</dt>
+            <dd>{{repo.owner}}</dd>
+        <dt>Last Change:</dt>
+            <dd>{{last_change}}</dd>
+    </dl>
+</div>
+
+<h2>Recent Changes</h2>
+<table>
+<tbody>
+{% for change in changelog %}
+<tr>
+    <td></td>
+    <td></td>
+    <td></td>
+    <td></td>
+</tr>
+{% endfor %}
+</tbody>
+</table>
+{% endcomment %}
+
+{% endblock %}
     (r'^tos/', direct_to_template, {'template':'tos.html'}),
     (r'^about/', direct_to_template, {'template':'about.html'}),
 
+    (r'^u/(?P<username>\w+)/(?P<reponame>\w+)/$', 'freehg.repos.views.summary'),
+
     # Uncomment this for admin:
     (r'^admin/', include('django.contrib.admin.urls')),
 )
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.