cat: default to working dir parent instead of tip
This introduces a defaultrev function that chooses
the working dir parent if a revision isn't specified,
and uses it in several places.
#header#
<title>#repo|escape#: manifest #manifest|short#</title>
</head>
<body>
<div class="buttons">
<a href="?cl=#rev#">changelog</a>
<a href="?sl=#rev#">shortlog</a>
<a href="?tags=">tags</a>
<a href="?cs=#node|short#">changeset</a>
#archives%archiveentry#
</div>
<h2>manifest for changeset #node|short#: #path|escape#</h2>
<table cellpadding="0" cellspacing="0">
<tr class="parity1">
<td><tt>drwxr-xr-x</tt>
<td><a href="?mf=#manifest|short#;path=#up|urlescape#">[up]</a>
#dentries%manifestdirentry#
#fentries%manifestfileentry#
</table>
#footer#