hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
authorAnton Shestakov <av6@dwimlabs.net>
Tue, 16 Jun 2015 16:07:39 +0800
changeset 25606 3bb6f5f478a7
parent 25605 dd89304687a3
child 25607 ddb2a648fdbd
hgweb: don't dereference symbolic revision in paper & coal style (issue2296) Let's make paper (and coal, since it borrows so much from paper) templates use symbolic revision in navigation links. The majority of links (log, filelog, annotate, etc) still use node hashes. Some pages don't have permanent links to current node hash (so it's not very easy to go from /rev/tip to /rev/<tip hash>), this will be addressed in future patches.
mercurial/templates/coal/map
mercurial/templates/paper/changeset.tmpl
mercurial/templates/paper/fileannotate.tmpl
mercurial/templates/paper/filecomparison.tmpl
mercurial/templates/paper/filediff.tmpl
mercurial/templates/paper/filelog.tmpl
mercurial/templates/paper/filerevision.tmpl
mercurial/templates/paper/graph.tmpl
mercurial/templates/paper/manifest.tmpl
mercurial/templates/paper/map
mercurial/templates/paper/shortlog.tmpl
tests/test-hgweb-commands.t
tests/test-hgweb-descend-empties.t
tests/test-hgweb-diffs.t
tests/test-hgweb-empty.t
tests/test-hgweb-filelog.t
tests/test-hgweb-removed.t
tests/test-hgweb-symrev.t
tests/test-hgweb.t
tests/test-highlight.t
--- a/mercurial/templates/coal/map	Tue Jun 16 14:37:53 2015 +0800
+++ b/mercurial/templates/coal/map	Tue Jun 16 16:07:39 2015 +0800
@@ -45,10 +45,10 @@
 direntry = '
   <tr class="fileline parity{parity}">
     <td class="name">
-      <a href="{url|urlescape}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">
+      <a href="{url|urlescape}file/{symrev}{path|urlescape}{sessionvars%urlparameter}">
         <img src="{staticurl|urlescape}coal-folder.png" alt="dir."/> {basename|escape}/
       </a>
-      <a href="{url|urlescape}file/{node|short}{path|urlescape}/{emptydirs|urlescape}{sessionvars%urlparameter}">
+      <a href="{url|urlescape}file/{symrev}{path|urlescape}/{emptydirs|urlescape}{sessionvars%urlparameter}">
         {emptydirs|escape}
       </a>
     </td>
@@ -59,7 +59,7 @@
 fileentry = '
   <tr class="fileline parity{parity}">
     <td class="filename">
-      <a href="{url|urlescape}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
+      <a href="{url|urlescape}file/{symrev}/{file|urlescape}{sessionvars%urlparameter}">
         <img src="{staticurl|urlescape}coal-file.png" alt="file"/> {basename|escape}
       </a>
     </td>
@@ -230,7 +230,7 @@
 index = ../paper/index.tmpl
 archiveentry = '
   <li>
-    <a href="{url|urlescape}archive/{node|short}{extension|urlescape}{ifeq(path,'/','',path|urlescape)}">{type|escape}</a>
+    <a href="{url|urlescape}archive/{symrev}{extension|urlescape}{ifeq(path,'/','',path|urlescape)}">{type|escape}</a>
   </li>'
 notfound = ../paper/notfound.tmpl
 error = ../paper/error.tmpl
--- a/mercurial/templates/paper/changeset.tmpl	Tue Jun 16 14:37:53 2015 +0800
+++ b/mercurial/templates/paper/changeset.tmpl	Tue Jun 16 16:07:39 2015 +0800
@@ -9,16 +9,16 @@
 <img src="{staticurl|urlescape}{logoimg}" alt="mercurial" /></a>
 </div>
 <ul>
- <li><a href="{url|urlescape}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
- <li><a href="{url|urlescape}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+ <li><a href="{url|urlescape}shortlog/{symrev}{sessionvars%urlparameter}">log</a></li>
+ <li><a href="{url|urlescape}graph/{symrev}{sessionvars%urlparameter}">graph</a></li>
  <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li>
  <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
  <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
 </ul>
 <ul>
  <li class="active">changeset</li>
- <li><a href="{url|urlescape}raw-rev/{node|short}{sessionvars%urlparameter}">raw</a></li>
- <li><a href="{url|urlescape}file/{node|short}{sessionvars%urlparameter}">browse</a></li>
+ <li><a href="{url|urlescape}raw-rev/{symrev}{sessionvars%urlparameter}">raw</a></li>
+ <li><a href="{url|urlescape}file/{symrev}{sessionvars%urlparameter}">browse</a></li>
 </ul>
 <ul>
  {archives%archiveentry}
--- a/mercurial/templates/paper/fileannotate.tmpl	Tue Jun 16 14:37:53 2015 +0800
+++ b/mercurial/templates/paper/fileannotate.tmpl	Tue Jun 16 16:07:39 2015 +0800
@@ -10,25 +10,25 @@
 <img src="{staticurl|urlescape}{logoimg}" alt="mercurial" /></a>
 </div>
 <ul>
-<li><a href="{url|urlescape}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
-<li><a href="{url|urlescape}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+<li><a href="{url|urlescape}shortlog/{symrev}{sessionvars%urlparameter}">log</a></li>
+<li><a href="{url|urlescape}graph/{symrev}{sessionvars%urlparameter}">graph</a></li>
 <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li>
 <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
 <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
 </ul>
 
 <ul>
-<li><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
-<li><a href="{url|urlescape}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
+<li><a href="{url|urlescape}rev/{symrev}{sessionvars%urlparameter}">changeset</a></li>
+<li><a href="{url|urlescape}file/{symrev}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
 </ul>
 <ul>
-<li><a href="{url|urlescape}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
+<li><a href="{url|urlescape}file/{symrev}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
 <li><a href="{url|urlescape}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a></li>
-<li><a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
-<li><a href="{url|urlescape}comparison/{node|short}/{file|urlescape}{sessionvars%urlparameter}">comparison</a></li>
+<li><a href="{url|urlescape}diff/{symrev}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
+<li><a href="{url|urlescape}comparison/{symrev}/{file|urlescape}{sessionvars%urlparameter}">comparison</a></li>
 <li class="active">annotate</li>
-<li><a href="{url|urlescape}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file log</a></li>
-<li><a href="{url|urlescape}raw-annotate/{node|short}/{file|urlescape}">raw</a></li>
+<li><a href="{url|urlescape}log/{symrev}/{file|urlescape}{sessionvars%urlparameter}">file log</a></li>
+<li><a href="{url|urlescape}raw-annotate/{symrev}/{file|urlescape}">raw</a></li>
 </ul>
 <ul>
 <li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li>
--- a/mercurial/templates/paper/filecomparison.tmpl	Tue Jun 16 14:37:53 2015 +0800
+++ b/mercurial/templates/paper/filecomparison.tmpl	Tue Jun 16 16:07:39 2015 +0800
@@ -10,24 +10,24 @@
 <img src="{staticurl|urlescape}{logoimg}" alt="mercurial" /></a>
 </div>
 <ul>
-<li><a href="{url|urlescape}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
-<li><a href="{url|urlescape}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+<li><a href="{url|urlescape}shortlog/{symrev}{sessionvars%urlparameter}">log</a></li>
+<li><a href="{url|urlescape}graph/{symrev}{sessionvars%urlparameter}">graph</a></li>
 <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li>
 <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
 <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
 </ul>
 <ul>
-<li><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
-<li><a href="{url|urlescape}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
+<li><a href="{url|urlescape}rev/{symrev}{sessionvars%urlparameter}">changeset</a></li>
+<li><a href="{url|urlescape}file/{symrev}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
 </ul>
 <ul>
-<li><a href="{url|urlescape}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
+<li><a href="{url|urlescape}file/{symrev}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
 <li><a href="{url|urlescape}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a></li>
-<li><a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
+<li><a href="{url|urlescape}diff/{symrev}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
 <li class="active">comparison</li>
-<li><a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
-<li><a href="{url|urlescape}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file log</a></li>
-<li><a href="{url|urlescape}raw-file/{node|short}/{file|urlescape}">raw</a></li>
+<li><a href="{url|urlescape}annotate/{symrev}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
+<li><a href="{url|urlescape}log/{symrev}/{file|urlescape}{sessionvars%urlparameter}">file log</a></li>
+<li><a href="{url|urlescape}raw-file/{symrev}/{file|urlescape}">raw</a></li>
 </ul>
 <ul>
 <li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li>
--- a/mercurial/templates/paper/filediff.tmpl	Tue Jun 16 14:37:53 2015 +0800
+++ b/mercurial/templates/paper/filediff.tmpl	Tue Jun 16 16:07:39 2015 +0800
@@ -10,24 +10,24 @@
 <img src="{staticurl|urlescape}{logoimg}" alt="mercurial" /></a>
 </div>
 <ul>
-<li><a href="{url|urlescape}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
-<li><a href="{url|urlescape}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+<li><a href="{url|urlescape}shortlog/{symrev}{sessionvars%urlparameter}">log</a></li>
+<li><a href="{url|urlescape}graph/{symrev}{sessionvars%urlparameter}">graph</a></li>
 <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li>
 <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
 <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
 </ul>
 <ul>
-<li><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
-<li><a href="{url|urlescape}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
+<li><a href="{url|urlescape}rev/{symrev}{sessionvars%urlparameter}">changeset</a></li>
+<li><a href="{url|urlescape}file/{symrev}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
 </ul>
 <ul>
-<li><a href="{url|urlescape}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
+<li><a href="{url|urlescape}file/{symrev}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
 <li><a href="{url|urlescape}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a></li>
 <li class="active">diff</li>
-<li><a href="{url|urlescape}comparison/{node|short}/{file|urlescape}{sessionvars%urlparameter}">comparison</a></li>
-<li><a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
-<li><a href="{url|urlescape}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file log</a></li>
-<li><a href="{url|urlescape}raw-file/{node|short}/{file|urlescape}">raw</a></li>
+<li><a href="{url|urlescape}comparison/{symrev}/{file|urlescape}{sessionvars%urlparameter}">comparison</a></li>
+<li><a href="{url|urlescape}annotate/{symrev}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
+<li><a href="{url|urlescape}log/{symrev}/{file|urlescape}{sessionvars%urlparameter}">file log</a></li>
+<li><a href="{url|urlescape}raw-file/{symrev}/{file|urlescape}">raw</a></li>
 </ul>
 <ul>
 <li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li>
--- a/mercurial/templates/paper/filelog.tmpl	Tue Jun 16 14:37:53 2015 +0800
+++ b/mercurial/templates/paper/filelog.tmpl	Tue Jun 16 16:07:39 2015 +0800
@@ -14,23 +14,23 @@
 <img src="{staticurl|urlescape}{logoimg}" alt="mercurial" /></a>
 </div>
 <ul>
-<li><a href="{url|urlescape}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
-<li><a href="{url|urlescape}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+<li><a href="{url|urlescape}shortlog/{symrev}{sessionvars%urlparameter}">log</a></li>
+<li><a href="{url|urlescape}graph/{symrev}{sessionvars%urlparameter}">graph</a></li>
 <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li>
 <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
 <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
 </ul>
 <ul>
-<li><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
-<li><a href="{url|urlescape}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
+<li><a href="{url|urlescape}rev/{symrev}{sessionvars%urlparameter}">changeset</a></li>
+<li><a href="{url|urlescape}file/{symrev}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
 </ul>
 <ul>
-<li><a href="{url|urlescape}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
-<li><a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
-<li><a href="{url|urlescape}comparison/{node|short}/{file|urlescape}{sessionvars%urlparameter}">comparison</a></li>
-<li><a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
+<li><a href="{url|urlescape}file/{symrev}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
+<li><a href="{url|urlescape}diff/{symrev}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
+<li><a href="{url|urlescape}comparison/{symrev}/{file|urlescape}{sessionvars%urlparameter}">comparison</a></li>
+<li><a href="{url|urlescape}annotate/{symrev}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
 <li class="active">file log</li>
-<li><a href="{url|urlescape}raw-file/{node|short}/{file|urlescape}">raw</a></li>
+<li><a href="{url|urlescape}raw-file/{symrev}/{file|urlescape}">raw</a></li>
 </ul>
 <ul>
 <li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li>
@@ -53,8 +53,8 @@
 </form>
 
 <div class="navigate">
-<a href="{url|urlescape}log/{node|short}/{file|urlescape}{lessvars%urlparameter}">less</a>
-<a href="{url|urlescape}log/{node|short}/{file|urlescape}{morevars%urlparameter}">more</a>
+<a href="{url|urlescape}log/{symrev}/{file|urlescape}{lessvars%urlparameter}">less</a>
+<a href="{url|urlescape}log/{symrev}/{file|urlescape}{morevars%urlparameter}">more</a>
 | {nav%filenav}</div>
 
 <table class="bigtable">
@@ -71,8 +71,8 @@
 </table>
 
 <div class="navigate">
-<a href="{url|urlescape}log/{node|short}/{file|urlescape}{lessvars%urlparameter}">less</a>
-<a href="{url|urlescape}log/{node|short}/{file|urlescape}{morevars%urlparameter}">more</a>
+<a href="{url|urlescape}log/{symrev}/{file|urlescape}{lessvars%urlparameter}">less</a>
+<a href="{url|urlescape}log/{symrev}/{file|urlescape}{morevars%urlparameter}">more</a>
 | {nav%filenav}
 </div>
 
--- a/mercurial/templates/paper/filerevision.tmpl	Tue Jun 16 14:37:53 2015 +0800
+++ b/mercurial/templates/paper/filerevision.tmpl	Tue Jun 16 16:07:39 2015 +0800
@@ -10,24 +10,24 @@
 <img src="{staticurl|urlescape}{logoimg}" alt="mercurial" /></a>
 </div>
 <ul>
-<li><a href="{url|urlescape}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
-<li><a href="{url|urlescape}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+<li><a href="{url|urlescape}shortlog/{symrev}{sessionvars%urlparameter}">log</a></li>
+<li><a href="{url|urlescape}graph/{symrev}{sessionvars%urlparameter}">graph</a></li>
 <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li>
 <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
 <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
 </ul>
 <ul>
-<li><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
-<li><a href="{url|urlescape}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
+<li><a href="{url|urlescape}rev/{symrev}{sessionvars%urlparameter}">changeset</a></li>
+<li><a href="{url|urlescape}file/{symrev}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
 </ul>
 <ul>
 <li class="active">file</li>
 <li><a href="{url|urlescape}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a></li>
-<li><a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
-<li><a href="{url|urlescape}comparison/{node|short}/{file|urlescape}{sessionvars%urlparameter}">comparison</a></li>
-<li><a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
-<li><a href="{url|urlescape}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file log</a></li>
-<li><a href="{url|urlescape}raw-file/{node|short}/{file|urlescape}">raw</a></li>
+<li><a href="{url|urlescape}diff/{symrev}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
+<li><a href="{url|urlescape}comparison/{symrev}/{file|urlescape}{sessionvars%urlparameter}">comparison</a></li>
+<li><a href="{url|urlescape}annotate/{symrev}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
+<li><a href="{url|urlescape}log/{symrev}/{file|urlescape}{sessionvars%urlparameter}">file log</a></li>
+<li><a href="{url|urlescape}raw-file/{symrev}/{file|urlescape}">raw</a></li>
 </ul>
 <ul>
 <li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li>
--- a/mercurial/templates/paper/graph.tmpl	Tue Jun 16 14:37:53 2015 +0800
+++ b/mercurial/templates/paper/graph.tmpl	Tue Jun 16 16:07:39 2015 +0800
@@ -15,15 +15,15 @@
 <img src="{staticurl|urlescape}{logoimg}" alt="mercurial" /></a>
 </div>
 <ul>
-<li><a href="{url|urlescape}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
+<li><a href="{url|urlescape}shortlog/{symrev}{sessionvars%urlparameter}">log</a></li>
 <li class="active">graph</li>
 <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li>
 <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
 <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
 </ul>
 <ul>
-<li><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
-<li><a href="{url|urlescape}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
+<li><a href="{url|urlescape}rev/{symrev}{sessionvars%urlparameter}">changeset</a></li>
+<li><a href="{url|urlescape}file/{symrev}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
 </ul>
 <ul>
  <li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li>
@@ -46,8 +46,8 @@
 </form>
 
 <div class="navigate">
-<a href="{url|urlescape}graph/{rev}{lessvars%urlparameter}">less</a>
-<a href="{url|urlescape}graph/{rev}{morevars%urlparameter}">more</a>
+<a href="{url|urlescape}graph/{symrev}{lessvars%urlparameter}">less</a>
+<a href="{url|urlescape}graph/{symrev}{morevars%urlparameter}">more</a>
 | rev {rev}: {changenav%navgraph}
 </div>
 
@@ -116,8 +116,8 @@
 </script>
 
 <div class="navigate">
-<a href="{url|urlescape}graph/{rev}{lessvars%urlparameter}">less</a>
-<a href="{url|urlescape}graph/{rev}{morevars%urlparameter}">more</a>
+<a href="{url|urlescape}graph/{symrev}{lessvars%urlparameter}">less</a>
+<a href="{url|urlescape}graph/{symrev}{morevars%urlparameter}">more</a>
 | rev {rev}: {changenav%navgraph}
 </div>
 
--- a/mercurial/templates/paper/manifest.tmpl	Tue Jun 16 14:37:53 2015 +0800
+++ b/mercurial/templates/paper/manifest.tmpl	Tue Jun 16 16:07:39 2015 +0800
@@ -10,14 +10,14 @@
 <img src="{staticurl|urlescape}{logoimg}" alt="mercurial" /></a>
 </div>
 <ul>
-<li><a href="{url|urlescape}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
-<li><a href="{url|urlescape}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+<li><a href="{url|urlescape}shortlog/{symrev}{sessionvars%urlparameter}">log</a></li>
+<li><a href="{url|urlescape}graph/{symrev}{sessionvars%urlparameter}">graph</a></li>
 <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li>
 <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
 <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
 </ul>
 <ul>
-<li><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
+<li><a href="{url|urlescape}rev/{symrev}{sessionvars%urlparameter}">changeset</a></li>
 <li class="active">browse</li>
 </ul>
 <ul>
@@ -48,7 +48,7 @@
 </thead>
 <tbody class="stripes2">
 <tr class="fileline">
-  <td class="name"><a href="{url|urlescape}file/{node|short}{up|urlescape}{sessionvars%urlparameter}">[up]</a></td>
+  <td class="name"><a href="{url|urlescape}file/{symrev}{up|urlescape}{sessionvars%urlparameter}">[up]</a></td>
   <td class="size"></td>
   <td class="permissions">drwxr-xr-x</td>
 </tr>
--- a/mercurial/templates/paper/map	Tue Jun 16 14:37:53 2015 +0800
+++ b/mercurial/templates/paper/map	Tue Jun 16 16:07:39 2015 +0800
@@ -44,10 +44,10 @@
 direntry = '
   <tr class="fileline">
     <td class="name">
-      <a href="{url|urlescape}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">
+      <a href="{url|urlescape}file/{symrev}{path|urlescape}{sessionvars%urlparameter}">
         <img src="{staticurl|urlescape}coal-folder.png" alt="dir."/> {basename|escape}/
       </a>
-      <a href="{url|urlescape}file/{node|short}{path|urlescape}/{emptydirs|urlescape}{sessionvars%urlparameter}">
+      <a href="{url|urlescape}file/{symrev}{path|urlescape}/{emptydirs|urlescape}{sessionvars%urlparameter}">
         {emptydirs|escape}
       </a>
     </td>
@@ -58,7 +58,7 @@
 fileentry = '
   <tr class="fileline">
     <td class="filename">
-      <a href="{url|urlescape}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
+      <a href="{url|urlescape}file/{symrev}/{file|urlescape}{sessionvars%urlparameter}">
         <img src="{staticurl|urlescape}coal-file.png" alt="file"/> {basename|escape}
       </a>
     </td>
@@ -240,7 +240,7 @@
 index = index.tmpl
 archiveentry = '
   <li>
-    <a href="{url|urlescape}archive/{node|short}{extension|urlescape}{ifeq(path,'/','',path|urlescape)}">{type|escape}</a>
+    <a href="{url|urlescape}archive/{symrev}{extension|urlescape}{ifeq(path,'/','',path|urlescape)}">{type|escape}</a>
   </li>'
 notfound = notfound.tmpl
 error = error.tmpl
--- a/mercurial/templates/paper/shortlog.tmpl	Tue Jun 16 14:37:53 2015 +0800
+++ b/mercurial/templates/paper/shortlog.tmpl	Tue Jun 16 16:07:39 2015 +0800
@@ -15,14 +15,14 @@
 </div>
 <ul>
 <li class="active">log</li>
-<li><a href="{url|urlescape}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+<li><a href="{url|urlescape}graph/{symrev}{sessionvars%urlparameter}">graph</a></li>
 <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li>
 <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
 <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
 </ul>
 <ul>
-<li><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
-<li><a href="{url|urlescape}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
+<li><a href="{url|urlescape}rev/{symrev}{sessionvars%urlparameter}">changeset</a></li>
+<li><a href="{url|urlescape}file/{symrev}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
 </ul>
 <ul>
 {archives%archiveentry}
@@ -48,8 +48,8 @@
 </form>
 
 <div class="navigate">
-<a href="{url|urlescape}shortlog/{rev}{lessvars%urlparameter}">less</a>
-<a href="{url|urlescape}shortlog/{rev}{morevars%urlparameter}">more</a>
+<a href="{url|urlescape}shortlog/{symrev}{lessvars%urlparameter}">less</a>
+<a href="{url|urlescape}shortlog/{symrev}{morevars%urlparameter}">more</a>
 | rev {rev}: {changenav%navshort}
 </div>
 
@@ -67,8 +67,8 @@
 </table>
 
 <div class="navigate">
-<a href="{url|urlescape}shortlog/{rev}{lessvars%urlparameter}">less</a>
-<a href="{url|urlescape}shortlog/{rev}{morevars%urlparameter}">more</a>
+<a href="{url|urlescape}shortlog/{symrev}{lessvars%urlparameter}">less</a>
+<a href="{url|urlescape}shortlog/{symrev}{morevars%urlparameter}">more</a>
 | rev {rev}: {changenav%navshort}
 </div>
 
--- a/tests/test-hgweb-commands.t	Tue Jun 16 14:37:53 2015 +0800
+++ b/tests/test-hgweb-commands.t	Tue Jun 16 16:07:39 2015 +0800
@@ -710,14 +710,14 @@
   </div>
   <ul>
   <li class="active">log</li>
-  <li><a href="/graph/cad8025a2e87">graph</a></li>
+  <li><a href="/graph/tip">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/cad8025a2e87">changeset</a></li>
-  <li><a href="/file/cad8025a2e87">browse</a></li>
+  <li><a href="/rev/tip">changeset</a></li>
+  <li><a href="/file/tip">browse</a></li>
   </ul>
   <ul>
   
@@ -744,8 +744,8 @@
   </form>
   
   <div class="navigate">
-  <a href="/shortlog/3?revcount=30">less</a>
-  <a href="/shortlog/3?revcount=120">more</a>
+  <a href="/shortlog/tip?revcount=30">less</a>
+  <a href="/shortlog/tip?revcount=120">more</a>
   | rev 3: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a> 
   </div>
   
@@ -795,8 +795,8 @@
   </table>
   
   <div class="navigate">
-  <a href="/shortlog/3?revcount=30">less</a>
-  <a href="/shortlog/3?revcount=120">more</a>
+  <a href="/shortlog/tip?revcount=30">less</a>
+  <a href="/shortlog/tip?revcount=120">more</a>
   | rev 3: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a> 
   </div>
   
@@ -845,16 +845,16 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-   <li><a href="/shortlog/2ef0ac749a14">log</a></li>
-   <li><a href="/graph/2ef0ac749a14">graph</a></li>
+   <li><a href="/shortlog/0">log</a></li>
+   <li><a href="/graph/0">graph</a></li>
    <li><a href="/tags">tags</a></li>
    <li><a href="/bookmarks">bookmarks</a></li>
    <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
    <li class="active">changeset</li>
-   <li><a href="/raw-rev/2ef0ac749a14">raw</a></li>
-   <li><a href="/file/2ef0ac749a14">browse</a></li>
+   <li><a href="/raw-rev/0">raw</a></li>
+   <li><a href="/file/0">browse</a></li>
   </ul>
   <ul>
    
@@ -1270,24 +1270,24 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-  <li><a href="/shortlog/a4f92ed23982">log</a></li>
-  <li><a href="/graph/a4f92ed23982">graph</a></li>
+  <li><a href="/shortlog/1">log</a></li>
+  <li><a href="/graph/1">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/a4f92ed23982">changeset</a></li>
-  <li><a href="/file/a4f92ed23982/">browse</a></li>
+  <li><a href="/rev/1">changeset</a></li>
+  <li><a href="/file/1/">browse</a></li>
   </ul>
   <ul>
   <li class="active">file</li>
   <li><a href="/file/tip/foo">latest</a></li>
-  <li><a href="/diff/a4f92ed23982/foo">diff</a></li>
-  <li><a href="/comparison/a4f92ed23982/foo">comparison</a></li>
-  <li><a href="/annotate/a4f92ed23982/foo">annotate</a></li>
-  <li><a href="/log/a4f92ed23982/foo">file log</a></li>
-  <li><a href="/raw-file/a4f92ed23982/foo">raw</a></li>
+  <li><a href="/diff/1/foo">diff</a></li>
+  <li><a href="/comparison/1/foo">comparison</a></li>
+  <li><a href="/annotate/1/foo">annotate</a></li>
+  <li><a href="/log/1/foo">file log</a></li>
+  <li><a href="/raw-file/1/foo">raw</a></li>
   </ul>
   <ul>
   <li><a href="/help">help</a></li>
@@ -1394,24 +1394,24 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-  <li><a href="/shortlog/1d22e65f027e">log</a></li>
-  <li><a href="/graph/1d22e65f027e">graph</a></li>
+  <li><a href="/shortlog/2">log</a></li>
+  <li><a href="/graph/2">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/1d22e65f027e">changeset</a></li>
-  <li><a href="/file/1d22e65f027e/">browse</a></li>
+  <li><a href="/rev/2">changeset</a></li>
+  <li><a href="/file/2/">browse</a></li>
   </ul>
   <ul>
   <li class="active">file</li>
   <li><a href="/file/tip/foo">latest</a></li>
-  <li><a href="/diff/1d22e65f027e/foo">diff</a></li>
-  <li><a href="/comparison/1d22e65f027e/foo">comparison</a></li>
-  <li><a href="/annotate/1d22e65f027e/foo">annotate</a></li>
-  <li><a href="/log/1d22e65f027e/foo">file log</a></li>
-  <li><a href="/raw-file/1d22e65f027e/foo">raw</a></li>
+  <li><a href="/diff/2/foo">diff</a></li>
+  <li><a href="/comparison/2/foo">comparison</a></li>
+  <li><a href="/annotate/2/foo">annotate</a></li>
+  <li><a href="/log/2/foo">file log</a></li>
+  <li><a href="/raw-file/2/foo">raw</a></li>
   </ul>
   <ul>
   <li><a href="/help">help</a></li>
--- a/tests/test-hgweb-descend-empties.t	Tue Jun 16 14:37:53 2015 +0800
+++ b/tests/test-hgweb-descend-empties.t	Tue Jun 16 16:07:39 2015 +0800
@@ -51,14 +51,14 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-  <li><a href="/shortlog/c9f45f7a1659">log</a></li>
-  <li><a href="/graph/c9f45f7a1659">graph</a></li>
+  <li><a href="/shortlog/tip">log</a></li>
+  <li><a href="/graph/tip">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/c9f45f7a1659">changeset</a></li>
+  <li><a href="/rev/tip">changeset</a></li>
   <li class="active">browse</li>
   </ul>
   <ul>
@@ -90,17 +90,17 @@
   </thead>
   <tbody class="stripes2">
   <tr class="fileline">
-    <td class="name"><a href="/file/c9f45f7a1659/">[up]</a></td>
+    <td class="name"><a href="/file/tip/">[up]</a></td>
     <td class="size"></td>
     <td class="permissions">drwxr-xr-x</td>
   </tr>
   
   <tr class="fileline">
   <td class="name">
-  <a href="/file/c9f45f7a1659/a1">
+  <a href="/file/tip/a1">
   <img src="/static/coal-folder.png" alt="dir."/> a1/
   </a>
-  <a href="/file/c9f45f7a1659/a1/a2/a3/a4">
+  <a href="/file/tip/a1/a2/a3/a4">
   a2/a3/a4
   </a>
   </td>
@@ -109,10 +109,10 @@
   </tr>
   <tr class="fileline">
   <td class="name">
-  <a href="/file/c9f45f7a1659/b1">
+  <a href="/file/tip/b1">
   <img src="/static/coal-folder.png" alt="dir."/> b1/
   </a>
-  <a href="/file/c9f45f7a1659/b1/b2/b3">
+  <a href="/file/tip/b1/b2/b3">
   b2/b3
   </a>
   </td>
@@ -121,10 +121,10 @@
   </tr>
   <tr class="fileline">
   <td class="name">
-  <a href="/file/c9f45f7a1659/d1">
+  <a href="/file/tip/d1">
   <img src="/static/coal-folder.png" alt="dir."/> d1/
   </a>
-  <a href="/file/c9f45f7a1659/d1/d2">
+  <a href="/file/tip/d1/d2">
   d2
   </a>
   </td>
@@ -167,14 +167,14 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-  <li><a href="/shortlog/c9f45f7a1659?style=coal">log</a></li>
-  <li><a href="/graph/c9f45f7a1659?style=coal">graph</a></li>
+  <li><a href="/shortlog/tip?style=coal">log</a></li>
+  <li><a href="/graph/tip?style=coal">graph</a></li>
   <li><a href="/tags?style=coal">tags</a></li>
   <li><a href="/bookmarks?style=coal">bookmarks</a></li>
   <li><a href="/branches?style=coal">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/c9f45f7a1659?style=coal">changeset</a></li>
+  <li><a href="/rev/tip?style=coal">changeset</a></li>
   <li class="active">browse</li>
   </ul>
   <ul>
@@ -206,17 +206,17 @@
   </thead>
   <tbody class="stripes2">
   <tr class="fileline">
-    <td class="name"><a href="/file/c9f45f7a1659/?style=coal">[up]</a></td>
+    <td class="name"><a href="/file/tip/?style=coal">[up]</a></td>
     <td class="size"></td>
     <td class="permissions">drwxr-xr-x</td>
   </tr>
   
   <tr class="fileline parity1">
   <td class="name">
-  <a href="/file/c9f45f7a1659/a1?style=coal">
+  <a href="/file/tip/a1?style=coal">
   <img src="/static/coal-folder.png" alt="dir."/> a1/
   </a>
-  <a href="/file/c9f45f7a1659/a1/a2/a3/a4?style=coal">
+  <a href="/file/tip/a1/a2/a3/a4?style=coal">
   a2/a3/a4
   </a>
   </td>
@@ -225,10 +225,10 @@
   </tr>
   <tr class="fileline parity0">
   <td class="name">
-  <a href="/file/c9f45f7a1659/b1?style=coal">
+  <a href="/file/tip/b1?style=coal">
   <img src="/static/coal-folder.png" alt="dir."/> b1/
   </a>
-  <a href="/file/c9f45f7a1659/b1/b2/b3?style=coal">
+  <a href="/file/tip/b1/b2/b3?style=coal">
   b2/b3
   </a>
   </td>
@@ -237,10 +237,10 @@
   </tr>
   <tr class="fileline parity1">
   <td class="name">
-  <a href="/file/c9f45f7a1659/d1?style=coal">
+  <a href="/file/tip/d1?style=coal">
   <img src="/static/coal-folder.png" alt="dir."/> d1/
   </a>
-  <a href="/file/c9f45f7a1659/d1/d2?style=coal">
+  <a href="/file/tip/d1/d2?style=coal">
   d2
   </a>
   </td>
--- a/tests/test-hgweb-diffs.t	Tue Jun 16 14:37:53 2015 +0800
+++ b/tests/test-hgweb-diffs.t	Tue Jun 16 16:07:39 2015 +0800
@@ -57,16 +57,16 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-   <li><a href="/shortlog/0cd96de13884">log</a></li>
-   <li><a href="/graph/0cd96de13884">graph</a></li>
+   <li><a href="/shortlog/0">log</a></li>
+   <li><a href="/graph/0">graph</a></li>
    <li><a href="/tags">tags</a></li>
    <li><a href="/bookmarks">bookmarks</a></li>
    <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
    <li class="active">changeset</li>
-   <li><a href="/raw-rev/0cd96de13884">raw</a></li>
-   <li><a href="/file/0cd96de13884">browse</a></li>
+   <li><a href="/raw-rev/0">raw</a></li>
+   <li><a href="/file/0">browse</a></li>
   </ul>
   <ul>
    
@@ -223,24 +223,24 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-  <li><a href="/shortlog/559edbd9ed20">log</a></li>
-  <li><a href="/graph/559edbd9ed20">graph</a></li>
+  <li><a href="/shortlog/tip">log</a></li>
+  <li><a href="/graph/tip">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/559edbd9ed20">changeset</a></li>
-  <li><a href="/file/559edbd9ed20">browse</a></li>
+  <li><a href="/rev/tip">changeset</a></li>
+  <li><a href="/file/tip">browse</a></li>
   </ul>
   <ul>
-  <li><a href="/file/559edbd9ed20/b">file</a></li>
+  <li><a href="/file/tip/b">file</a></li>
   <li><a href="/file/tip/b">latest</a></li>
   <li class="active">diff</li>
-  <li><a href="/comparison/559edbd9ed20/b">comparison</a></li>
-  <li><a href="/annotate/559edbd9ed20/b">annotate</a></li>
-  <li><a href="/log/559edbd9ed20/b">file log</a></li>
-  <li><a href="/raw-file/559edbd9ed20/b">raw</a></li>
+  <li><a href="/comparison/tip/b">comparison</a></li>
+  <li><a href="/annotate/tip/b">annotate</a></li>
+  <li><a href="/log/tip/b">file log</a></li>
+  <li><a href="/raw-file/tip/b">raw</a></li>
   </ul>
   <ul>
   <li><a href="/help">help</a></li>
@@ -329,16 +329,16 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-   <li><a href="/shortlog/0cd96de13884">log</a></li>
-   <li><a href="/graph/0cd96de13884">graph</a></li>
+   <li><a href="/shortlog/0">log</a></li>
+   <li><a href="/graph/0">graph</a></li>
    <li><a href="/tags">tags</a></li>
    <li><a href="/bookmarks">bookmarks</a></li>
    <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
    <li class="active">changeset</li>
-   <li><a href="/raw-rev/0cd96de13884">raw</a></li>
-   <li><a href="/file/0cd96de13884">browse</a></li>
+   <li><a href="/raw-rev/0">raw</a></li>
+   <li><a href="/file/0">browse</a></li>
   </ul>
   <ul>
    
@@ -499,24 +499,24 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-  <li><a href="/shortlog/559edbd9ed20">log</a></li>
-  <li><a href="/graph/559edbd9ed20">graph</a></li>
+  <li><a href="/shortlog/tip">log</a></li>
+  <li><a href="/graph/tip">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/559edbd9ed20">changeset</a></li>
-  <li><a href="/file/559edbd9ed20">browse</a></li>
+  <li><a href="/rev/tip">changeset</a></li>
+  <li><a href="/file/tip">browse</a></li>
   </ul>
   <ul>
-  <li><a href="/file/559edbd9ed20/a">file</a></li>
+  <li><a href="/file/tip/a">file</a></li>
   <li><a href="/file/tip/a">latest</a></li>
   <li class="active">diff</li>
-  <li><a href="/comparison/559edbd9ed20/a">comparison</a></li>
-  <li><a href="/annotate/559edbd9ed20/a">annotate</a></li>
-  <li><a href="/log/559edbd9ed20/a">file log</a></li>
-  <li><a href="/raw-file/559edbd9ed20/a">raw</a></li>
+  <li><a href="/comparison/tip/a">comparison</a></li>
+  <li><a href="/annotate/tip/a">annotate</a></li>
+  <li><a href="/log/tip/a">file log</a></li>
+  <li><a href="/raw-file/tip/a">raw</a></li>
   </ul>
   <ul>
   <li><a href="/help">help</a></li>
@@ -602,24 +602,24 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-  <li><a href="/shortlog/0cd96de13884">log</a></li>
-  <li><a href="/graph/0cd96de13884">graph</a></li>
+  <li><a href="/shortlog/0">log</a></li>
+  <li><a href="/graph/0">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/0cd96de13884">changeset</a></li>
-  <li><a href="/file/0cd96de13884">browse</a></li>
+  <li><a href="/rev/0">changeset</a></li>
+  <li><a href="/file/0">browse</a></li>
   </ul>
   <ul>
-  <li><a href="/file/0cd96de13884/a">file</a></li>
+  <li><a href="/file/0/a">file</a></li>
   <li><a href="/file/tip/a">latest</a></li>
-  <li><a href="/diff/0cd96de13884/a">diff</a></li>
+  <li><a href="/diff/0/a">diff</a></li>
   <li class="active">comparison</li>
-  <li><a href="/annotate/0cd96de13884/a">annotate</a></li>
-  <li><a href="/log/0cd96de13884/a">file log</a></li>
-  <li><a href="/raw-file/0cd96de13884/a">raw</a></li>
+  <li><a href="/annotate/0/a">annotate</a></li>
+  <li><a href="/log/0/a">file log</a></li>
+  <li><a href="/raw-file/0/a">raw</a></li>
   </ul>
   <ul>
   <li><a href="/help">help</a></li>
@@ -729,24 +729,24 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-  <li><a href="/shortlog/d73db4d812ff">log</a></li>
-  <li><a href="/graph/d73db4d812ff">graph</a></li>
+  <li><a href="/shortlog/tip">log</a></li>
+  <li><a href="/graph/tip">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/d73db4d812ff">changeset</a></li>
-  <li><a href="/file/d73db4d812ff">browse</a></li>
+  <li><a href="/rev/tip">changeset</a></li>
+  <li><a href="/file/tip">browse</a></li>
   </ul>
   <ul>
-  <li><a href="/file/d73db4d812ff/a">file</a></li>
+  <li><a href="/file/tip/a">file</a></li>
   <li><a href="/file/tip/a">latest</a></li>
-  <li><a href="/diff/d73db4d812ff/a">diff</a></li>
+  <li><a href="/diff/tip/a">diff</a></li>
   <li class="active">comparison</li>
-  <li><a href="/annotate/d73db4d812ff/a">annotate</a></li>
-  <li><a href="/log/d73db4d812ff/a">file log</a></li>
-  <li><a href="/raw-file/d73db4d812ff/a">raw</a></li>
+  <li><a href="/annotate/tip/a">annotate</a></li>
+  <li><a href="/log/tip/a">file log</a></li>
+  <li><a href="/raw-file/tip/a">raw</a></li>
   </ul>
   <ul>
   <li><a href="/help">help</a></li>
@@ -858,24 +858,24 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-  <li><a href="/shortlog/20e80271eb7a">log</a></li>
-  <li><a href="/graph/20e80271eb7a">graph</a></li>
+  <li><a href="/shortlog/tip">log</a></li>
+  <li><a href="/graph/tip">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/20e80271eb7a">changeset</a></li>
-  <li><a href="/file/20e80271eb7a">browse</a></li>
+  <li><a href="/rev/tip">changeset</a></li>
+  <li><a href="/file/tip">browse</a></li>
   </ul>
   <ul>
-  <li><a href="/file/20e80271eb7a/a">file</a></li>
+  <li><a href="/file/tip/a">file</a></li>
   <li><a href="/file/tip/a">latest</a></li>
-  <li><a href="/diff/20e80271eb7a/a">diff</a></li>
+  <li><a href="/diff/tip/a">diff</a></li>
   <li class="active">comparison</li>
-  <li><a href="/annotate/20e80271eb7a/a">annotate</a></li>
-  <li><a href="/log/20e80271eb7a/a">file log</a></li>
-  <li><a href="/raw-file/20e80271eb7a/a">raw</a></li>
+  <li><a href="/annotate/tip/a">annotate</a></li>
+  <li><a href="/log/tip/a">file log</a></li>
+  <li><a href="/raw-file/tip/a">raw</a></li>
   </ul>
   <ul>
   <li><a href="/help">help</a></li>
@@ -993,24 +993,24 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-  <li><a href="/shortlog/41d9fc4a6ae1">log</a></li>
-  <li><a href="/graph/41d9fc4a6ae1">graph</a></li>
+  <li><a href="/shortlog/tip">log</a></li>
+  <li><a href="/graph/tip">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/41d9fc4a6ae1">changeset</a></li>
-  <li><a href="/file/41d9fc4a6ae1">browse</a></li>
+  <li><a href="/rev/tip">changeset</a></li>
+  <li><a href="/file/tip">browse</a></li>
   </ul>
   <ul>
-  <li><a href="/file/41d9fc4a6ae1/e">file</a></li>
+  <li><a href="/file/tip/e">file</a></li>
   <li><a href="/file/tip/e">latest</a></li>
-  <li><a href="/diff/41d9fc4a6ae1/e">diff</a></li>
+  <li><a href="/diff/tip/e">diff</a></li>
   <li class="active">comparison</li>
-  <li><a href="/annotate/41d9fc4a6ae1/e">annotate</a></li>
-  <li><a href="/log/41d9fc4a6ae1/e">file log</a></li>
-  <li><a href="/raw-file/41d9fc4a6ae1/e">raw</a></li>
+  <li><a href="/annotate/tip/e">annotate</a></li>
+  <li><a href="/log/tip/e">file log</a></li>
+  <li><a href="/raw-file/tip/e">raw</a></li>
   </ul>
   <ul>
   <li><a href="/help">help</a></li>
--- a/tests/test-hgweb-empty.t	Tue Jun 16 14:37:53 2015 +0800
+++ b/tests/test-hgweb-empty.t	Tue Jun 16 16:07:39 2015 +0800
@@ -33,14 +33,14 @@
   </div>
   <ul>
   <li class="active">log</li>
-  <li><a href="/graph/000000000000">graph</a></li>
+  <li><a href="/graph/tip">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/000000000000">changeset</a></li>
-  <li><a href="/file/000000000000">browse</a></li>
+  <li><a href="/rev/tip">changeset</a></li>
+  <li><a href="/file/tip">browse</a></li>
   </ul>
   <ul>
   
@@ -67,8 +67,8 @@
   </form>
   
   <div class="navigate">
-  <a href="/shortlog/-1?revcount=30">less</a>
-  <a href="/shortlog/-1?revcount=120">more</a>
+  <a href="/shortlog/tip?revcount=30">less</a>
+  <a href="/shortlog/tip?revcount=120">more</a>
   | rev -1: 
   </div>
   
@@ -86,8 +86,8 @@
   </table>
   
   <div class="navigate">
-  <a href="/shortlog/-1?revcount=30">less</a>
-  <a href="/shortlog/-1?revcount=120">more</a>
+  <a href="/shortlog/tip?revcount=30">less</a>
+  <a href="/shortlog/tip?revcount=120">more</a>
   | rev -1: 
   </div>
   
@@ -144,14 +144,14 @@
   </div>
   <ul>
   <li class="active">log</li>
-  <li><a href="/graph/000000000000">graph</a></li>
+  <li><a href="/graph/tip">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/000000000000">changeset</a></li>
-  <li><a href="/file/000000000000">browse</a></li>
+  <li><a href="/rev/tip">changeset</a></li>
+  <li><a href="/file/tip">browse</a></li>
   </ul>
   <ul>
   
@@ -178,8 +178,8 @@
   </form>
   
   <div class="navigate">
-  <a href="/shortlog/-1?revcount=5">less</a>
-  <a href="/shortlog/-1?revcount=20">more</a>
+  <a href="/shortlog/tip?revcount=5">less</a>
+  <a href="/shortlog/tip?revcount=20">more</a>
   | rev -1: 
   </div>
   
@@ -197,8 +197,8 @@
   </table>
   
   <div class="navigate">
-  <a href="/shortlog/-1?revcount=5">less</a>
-  <a href="/shortlog/-1?revcount=20">more</a>
+  <a href="/shortlog/tip?revcount=5">less</a>
+  <a href="/shortlog/tip?revcount=20">more</a>
   | rev -1: 
   </div>
   
@@ -253,15 +253,15 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-  <li><a href="/shortlog/000000000000">log</a></li>
+  <li><a href="/shortlog/tip">log</a></li>
   <li class="active">graph</li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/000000000000">changeset</a></li>
-  <li><a href="/file/000000000000">browse</a></li>
+  <li><a href="/rev/tip">changeset</a></li>
+  <li><a href="/file/tip">browse</a></li>
   </ul>
   <ul>
    <li><a href="/help">help</a></li>
@@ -285,8 +285,8 @@
   </form>
   
   <div class="navigate">
-  <a href="/graph/-1?revcount=30">less</a>
-  <a href="/graph/-1?revcount=120">more</a>
+  <a href="/graph/tip?revcount=30">less</a>
+  <a href="/graph/tip?revcount=120">more</a>
   | rev -1: 
   </div>
   
@@ -355,8 +355,8 @@
   </script>
   
   <div class="navigate">
-  <a href="/graph/-1?revcount=30">less</a>
-  <a href="/graph/-1?revcount=120">more</a>
+  <a href="/graph/tip?revcount=30">less</a>
+  <a href="/graph/tip?revcount=120">more</a>
   | rev -1: 
   </div>
   
@@ -402,14 +402,14 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-  <li><a href="/shortlog/000000000000">log</a></li>
-  <li><a href="/graph/000000000000">graph</a></li>
+  <li><a href="/shortlog/tip">log</a></li>
+  <li><a href="/graph/tip">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/000000000000">changeset</a></li>
+  <li><a href="/rev/tip">changeset</a></li>
   <li class="active">browse</li>
   </ul>
   <ul>
@@ -441,7 +441,7 @@
   </thead>
   <tbody class="stripes2">
   <tr class="fileline">
-    <td class="name"><a href="/file/000000000000/">[up]</a></td>
+    <td class="name"><a href="/file/tip/">[up]</a></td>
     <td class="size"></td>
     <td class="permissions">drwxr-xr-x</td>
   </tr>
--- a/tests/test-hgweb-filelog.t	Tue Jun 16 14:37:53 2015 +0800
+++ b/tests/test-hgweb-filelog.t	Tue Jun 16 16:07:39 2015 +0800
@@ -157,23 +157,23 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-  <li><a href="/shortlog/3f41bc784e7e">log</a></li>
-  <li><a href="/graph/3f41bc784e7e">graph</a></li>
+  <li><a href="/shortlog/tip">log</a></li>
+  <li><a href="/graph/tip">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/3f41bc784e7e">changeset</a></li>
-  <li><a href="/file/3f41bc784e7e">browse</a></li>
+  <li><a href="/rev/tip">changeset</a></li>
+  <li><a href="/file/tip">browse</a></li>
   </ul>
   <ul>
-  <li><a href="/file/3f41bc784e7e/a">file</a></li>
-  <li><a href="/diff/3f41bc784e7e/a">diff</a></li>
-  <li><a href="/comparison/3f41bc784e7e/a">comparison</a></li>
-  <li><a href="/annotate/3f41bc784e7e/a">annotate</a></li>
+  <li><a href="/file/tip/a">file</a></li>
+  <li><a href="/diff/tip/a">diff</a></li>
+  <li><a href="/comparison/tip/a">comparison</a></li>
+  <li><a href="/annotate/tip/a">annotate</a></li>
   <li class="active">file log</li>
-  <li><a href="/raw-file/3f41bc784e7e/a">raw</a></li>
+  <li><a href="/raw-file/tip/a">raw</a></li>
   </ul>
   <ul>
   <li><a href="/help">help</a></li>
@@ -197,8 +197,8 @@
   </form>
   
   <div class="navigate">
-  <a href="/log/3f41bc784e7e/a?revcount=30">less</a>
-  <a href="/log/3f41bc784e7e/a?revcount=120">more</a>
+  <a href="/log/tip/a?revcount=30">less</a>
+  <a href="/log/tip/a?revcount=120">more</a>
   | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
   
   <table class="bigtable">
@@ -231,8 +231,8 @@
   </table>
   
   <div class="navigate">
-  <a href="/log/3f41bc784e7e/a?revcount=30">less</a>
-  <a href="/log/3f41bc784e7e/a?revcount=120">more</a>
+  <a href="/log/tip/a?revcount=30">less</a>
+  <a href="/log/tip/a?revcount=120">more</a>
   | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> 
   </div>
   
@@ -274,23 +274,23 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-  <li><a href="/shortlog/3f41bc784e7e">log</a></li>
-  <li><a href="/graph/3f41bc784e7e">graph</a></li>
+  <li><a href="/shortlog/4">log</a></li>
+  <li><a href="/graph/4">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/3f41bc784e7e">changeset</a></li>
-  <li><a href="/file/3f41bc784e7e">browse</a></li>
+  <li><a href="/rev/4">changeset</a></li>
+  <li><a href="/file/4">browse</a></li>
   </ul>
   <ul>
-  <li><a href="/file/3f41bc784e7e/a">file</a></li>
-  <li><a href="/diff/3f41bc784e7e/a">diff</a></li>
-  <li><a href="/comparison/3f41bc784e7e/a">comparison</a></li>
-  <li><a href="/annotate/3f41bc784e7e/a">annotate</a></li>
+  <li><a href="/file/4/a">file</a></li>
+  <li><a href="/diff/4/a">diff</a></li>
+  <li><a href="/comparison/4/a">comparison</a></li>
+  <li><a href="/annotate/4/a">annotate</a></li>
   <li class="active">file log</li>
-  <li><a href="/raw-file/3f41bc784e7e/a">raw</a></li>
+  <li><a href="/raw-file/4/a">raw</a></li>
   </ul>
   <ul>
   <li><a href="/help">help</a></li>
@@ -314,8 +314,8 @@
   </form>
   
   <div class="navigate">
-  <a href="/log/3f41bc784e7e/a?revcount=30">less</a>
-  <a href="/log/3f41bc784e7e/a?revcount=120">more</a>
+  <a href="/log/4/a?revcount=30">less</a>
+  <a href="/log/4/a?revcount=120">more</a>
   | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
   
   <table class="bigtable">
@@ -348,8 +348,8 @@
   </table>
   
   <div class="navigate">
-  <a href="/log/3f41bc784e7e/a?revcount=30">less</a>
-  <a href="/log/3f41bc784e7e/a?revcount=120">more</a>
+  <a href="/log/4/a?revcount=30">less</a>
+  <a href="/log/4/a?revcount=120">more</a>
   | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> 
   </div>
   
@@ -391,23 +391,23 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-  <li><a href="/shortlog/5ed941583260">log</a></li>
-  <li><a href="/graph/5ed941583260">graph</a></li>
+  <li><a href="/shortlog/3">log</a></li>
+  <li><a href="/graph/3">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/5ed941583260">changeset</a></li>
-  <li><a href="/file/5ed941583260">browse</a></li>
+  <li><a href="/rev/3">changeset</a></li>
+  <li><a href="/file/3">browse</a></li>
   </ul>
   <ul>
-  <li><a href="/file/5ed941583260/a">file</a></li>
-  <li><a href="/diff/5ed941583260/a">diff</a></li>
-  <li><a href="/comparison/5ed941583260/a">comparison</a></li>
-  <li><a href="/annotate/5ed941583260/a">annotate</a></li>
+  <li><a href="/file/3/a">file</a></li>
+  <li><a href="/diff/3/a">diff</a></li>
+  <li><a href="/comparison/3/a">comparison</a></li>
+  <li><a href="/annotate/3/a">annotate</a></li>
   <li class="active">file log</li>
-  <li><a href="/raw-file/5ed941583260/a">raw</a></li>
+  <li><a href="/raw-file/3/a">raw</a></li>
   </ul>
   <ul>
   <li><a href="/help">help</a></li>
@@ -431,8 +431,8 @@
   </form>
   
   <div class="navigate">
-  <a href="/log/5ed941583260/a?revcount=30">less</a>
-  <a href="/log/5ed941583260/a?revcount=120">more</a>
+  <a href="/log/3/a?revcount=30">less</a>
+  <a href="/log/3/a?revcount=120">more</a>
   | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
   
   <table class="bigtable">
@@ -457,8 +457,8 @@
   </table>
   
   <div class="navigate">
-  <a href="/log/5ed941583260/a?revcount=30">less</a>
-  <a href="/log/5ed941583260/a?revcount=120">more</a>
+  <a href="/log/3/a?revcount=30">less</a>
+  <a href="/log/3/a?revcount=120">more</a>
   | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> 
   </div>
   
@@ -500,23 +500,23 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-  <li><a href="/shortlog/5ed941583260">log</a></li>
-  <li><a href="/graph/5ed941583260">graph</a></li>
+  <li><a href="/shortlog/1">log</a></li>
+  <li><a href="/graph/1">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/5ed941583260">changeset</a></li>
-  <li><a href="/file/5ed941583260">browse</a></li>
+  <li><a href="/rev/1">changeset</a></li>
+  <li><a href="/file/1">browse</a></li>
   </ul>
   <ul>
-  <li><a href="/file/5ed941583260/a">file</a></li>
-  <li><a href="/diff/5ed941583260/a">diff</a></li>
-  <li><a href="/comparison/5ed941583260/a">comparison</a></li>
-  <li><a href="/annotate/5ed941583260/a">annotate</a></li>
+  <li><a href="/file/1/a">file</a></li>
+  <li><a href="/diff/1/a">diff</a></li>
+  <li><a href="/comparison/1/a">comparison</a></li>
+  <li><a href="/annotate/1/a">annotate</a></li>
   <li class="active">file log</li>
-  <li><a href="/raw-file/5ed941583260/a">raw</a></li>
+  <li><a href="/raw-file/1/a">raw</a></li>
   </ul>
   <ul>
   <li><a href="/help">help</a></li>
@@ -540,8 +540,8 @@
   </form>
   
   <div class="navigate">
-  <a href="/log/5ed941583260/a?revcount=30">less</a>
-  <a href="/log/5ed941583260/a?revcount=120">more</a>
+  <a href="/log/1/a?revcount=30">less</a>
+  <a href="/log/1/a?revcount=120">more</a>
   | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
   
   <table class="bigtable">
@@ -566,8 +566,8 @@
   </table>
   
   <div class="navigate">
-  <a href="/log/5ed941583260/a?revcount=30">less</a>
-  <a href="/log/5ed941583260/a?revcount=120">more</a>
+  <a href="/log/1/a?revcount=30">less</a>
+  <a href="/log/1/a?revcount=120">more</a>
   | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> 
   </div>
   
--- a/tests/test-hgweb-removed.t	Tue Jun 16 14:37:53 2015 +0800
+++ b/tests/test-hgweb-removed.t	Tue Jun 16 16:07:39 2015 +0800
@@ -38,16 +38,16 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-   <li><a href="/shortlog/c78f6c5cbea9">log</a></li>
-   <li><a href="/graph/c78f6c5cbea9">graph</a></li>
+   <li><a href="/shortlog/tip">log</a></li>
+   <li><a href="/graph/tip">graph</a></li>
    <li><a href="/tags">tags</a></li>
    <li><a href="/bookmarks">bookmarks</a></li>
    <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
    <li class="active">changeset</li>
-   <li><a href="/raw-rev/c78f6c5cbea9">raw</a></li>
-   <li><a href="/file/c78f6c5cbea9">browse</a></li>
+   <li><a href="/raw-rev/tip">raw</a></li>
+   <li><a href="/file/tip">browse</a></li>
   </ul>
   <ul>
    
@@ -159,24 +159,24 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-  <li><a href="/shortlog/c78f6c5cbea9">log</a></li>
-  <li><a href="/graph/c78f6c5cbea9">graph</a></li>
+  <li><a href="/shortlog/tip">log</a></li>
+  <li><a href="/graph/tip">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/c78f6c5cbea9">changeset</a></li>
-  <li><a href="/file/c78f6c5cbea9">browse</a></li>
+  <li><a href="/rev/tip">changeset</a></li>
+  <li><a href="/file/tip">browse</a></li>
   </ul>
   <ul>
-  <li><a href="/file/c78f6c5cbea9/a">file</a></li>
+  <li><a href="/file/tip/a">file</a></li>
   <li><a href="/file/tip/a">latest</a></li>
   <li class="active">diff</li>
-  <li><a href="/comparison/c78f6c5cbea9/a">comparison</a></li>
-  <li><a href="/annotate/c78f6c5cbea9/a">annotate</a></li>
-  <li><a href="/log/c78f6c5cbea9/a">file log</a></li>
-  <li><a href="/raw-file/c78f6c5cbea9/a">raw</a></li>
+  <li><a href="/comparison/tip/a">comparison</a></li>
+  <li><a href="/annotate/tip/a">annotate</a></li>
+  <li><a href="/log/tip/a">file log</a></li>
+  <li><a href="/raw-file/tip/a">raw</a></li>
   </ul>
   <ul>
   <li><a href="/help">help</a></li>
--- a/tests/test-hgweb-symrev.t	Tue Jun 16 14:37:53 2015 +0800
+++ b/tests/test-hgweb-symrev.t	Tue Jun 16 16:07:39 2015 +0800
@@ -38,40 +38,40 @@
 (De)referencing symbolic revisions (paper)
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'shortlog?style=paper' | egrep $REVLINKS
-  <li><a href="/graph/9d8c40cba617?style=paper">graph</a></li>
-  <li><a href="/rev/9d8c40cba617?style=paper">changeset</a></li>
-  <li><a href="/file/9d8c40cba617?style=paper">browse</a></li>
+  <li><a href="/graph/tip?style=paper">graph</a></li>
+  <li><a href="/rev/tip?style=paper">changeset</a></li>
+  <li><a href="/file/tip?style=paper">browse</a></li>
   <a href="/archive/tip.zip">zip</a>
-  <a href="/shortlog/2?revcount=30&style=paper">less</a>
-  <a href="/shortlog/2?revcount=120&style=paper">more</a>
+  <a href="/shortlog/tip?revcount=30&style=paper">less</a>
+  <a href="/shortlog/tip?revcount=120&style=paper">more</a>
   | rev 2: <a href="/shortlog/43c799df6e75?style=paper">(0)</a> <a href="/shortlog/tip?style=paper">tip</a> 
      <a href="/rev/9d8c40cba617?style=paper">third</a>
      <a href="/rev/a7c1559b7bba?style=paper">second</a>
      <a href="/rev/43c799df6e75?style=paper">first</a>
-  <a href="/shortlog/2?revcount=30&style=paper">less</a>
-  <a href="/shortlog/2?revcount=120&style=paper">more</a>
+  <a href="/shortlog/tip?revcount=30&style=paper">less</a>
+  <a href="/shortlog/tip?revcount=120&style=paper">more</a>
   | rev 2: <a href="/shortlog/43c799df6e75?style=paper">(0)</a> <a href="/shortlog/tip?style=paper">tip</a> 
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'graph?style=paper' | egrep $REVLINKS
-  <li><a href="/shortlog/9d8c40cba617?style=paper">log</a></li>
-  <li><a href="/rev/9d8c40cba617?style=paper">changeset</a></li>
-  <li><a href="/file/9d8c40cba617?style=paper">browse</a></li>
-  <a href="/graph/2?revcount=30&style=paper">less</a>
-  <a href="/graph/2?revcount=120&style=paper">more</a>
+  <li><a href="/shortlog/tip?style=paper">log</a></li>
+  <li><a href="/rev/tip?style=paper">changeset</a></li>
+  <li><a href="/file/tip?style=paper">browse</a></li>
+  <a href="/graph/tip?revcount=30&style=paper">less</a>
+  <a href="/graph/tip?revcount=120&style=paper">more</a>
   | rev 2: <a href="/graph/43c799df6e75?style=paper">(0)</a> <a href="/graph/tip?style=paper">tip</a> 
-  <a href="/graph/2?revcount=30&style=paper">less</a>
-  <a href="/graph/2?revcount=120&style=paper">more</a>
+  <a href="/graph/tip?revcount=30&style=paper">less</a>
+  <a href="/graph/tip?revcount=120&style=paper">more</a>
   | rev 2: <a href="/graph/43c799df6e75?style=paper">(0)</a> <a href="/graph/tip?style=paper">tip</a> 
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file?style=paper' | egrep $REVLINKS
-  <li><a href="/shortlog/9d8c40cba617?style=paper">log</a></li>
-  <li><a href="/graph/9d8c40cba617?style=paper">graph</a></li>
-  <li><a href="/rev/9d8c40cba617?style=paper">changeset</a></li>
-  <a href="/archive/9d8c40cba617.zip">zip</a>
-    <td class="name"><a href="/file/9d8c40cba617/?style=paper">[up]</a></td>
-  <a href="/file/9d8c40cba617/dir?style=paper">
-  <a href="/file/9d8c40cba617/dir/?style=paper">
-  <a href="/file/9d8c40cba617/foo?style=paper">
+  <li><a href="/shortlog/tip?style=paper">log</a></li>
+  <li><a href="/graph/tip?style=paper">graph</a></li>
+  <li><a href="/rev/tip?style=paper">changeset</a></li>
+  <a href="/archive/tip.zip">zip</a>
+    <td class="name"><a href="/file/tip/?style=paper">[up]</a></td>
+  <a href="/file/tip/dir?style=paper">
+  <a href="/file/tip/dir/?style=paper">
+  <a href="/file/tip/foo?style=paper">
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'shortlog?style=paper&rev=all()' | egrep $REVLINKS
      <a href="/rev/9d8c40cba617?style=paper">third</a>
@@ -79,167 +79,167 @@
      <a href="/rev/43c799df6e75?style=paper">first</a>
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'rev/xyzzy?style=paper' | egrep $REVLINKS
-   <li><a href="/shortlog/a7c1559b7bba?style=paper">log</a></li>
-   <li><a href="/graph/a7c1559b7bba?style=paper">graph</a></li>
-   <li><a href="/raw-rev/a7c1559b7bba?style=paper">raw</a></li>
-   <li><a href="/file/a7c1559b7bba?style=paper">browse</a></li>
-  <a href="/archive/a7c1559b7bba.zip">zip</a>
+   <li><a href="/shortlog/xyzzy?style=paper">log</a></li>
+   <li><a href="/graph/xyzzy?style=paper">graph</a></li>
+   <li><a href="/raw-rev/xyzzy?style=paper">raw</a></li>
+   <li><a href="/file/xyzzy?style=paper">browse</a></li>
+  <a href="/archive/xyzzy.zip">zip</a>
    <td class="author"><a href="/rev/43c799df6e75?style=paper">43c799df6e75</a> </td>
    <td class="author"> <a href="/rev/9d8c40cba617?style=paper">9d8c40cba617</a></td>
    <td class="files"><a href="/file/a7c1559b7bba/foo?style=paper">foo</a> </td>
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'shortlog/xyzzy?style=paper' | egrep $REVLINKS
-  <li><a href="/graph/a7c1559b7bba?style=paper">graph</a></li>
-  <li><a href="/rev/a7c1559b7bba?style=paper">changeset</a></li>
-  <li><a href="/file/a7c1559b7bba?style=paper">browse</a></li>
-  <a href="/archive/tip.zip">zip</a>
-  <a href="/shortlog/1?revcount=30&style=paper">less</a>
-  <a href="/shortlog/1?revcount=120&style=paper">more</a>
+  <li><a href="/graph/xyzzy?style=paper">graph</a></li>
+  <li><a href="/rev/xyzzy?style=paper">changeset</a></li>
+  <li><a href="/file/xyzzy?style=paper">browse</a></li>
+  <a href="/archive/xyzzy.zip">zip</a>
+  <a href="/shortlog/xyzzy?revcount=30&style=paper">less</a>
+  <a href="/shortlog/xyzzy?revcount=120&style=paper">more</a>
   | rev 1: <a href="/shortlog/43c799df6e75?style=paper">(0)</a> <a href="/shortlog/tip?style=paper">tip</a> 
      <a href="/rev/a7c1559b7bba?style=paper">second</a>
      <a href="/rev/43c799df6e75?style=paper">first</a>
-  <a href="/shortlog/1?revcount=30&style=paper">less</a>
-  <a href="/shortlog/1?revcount=120&style=paper">more</a>
+  <a href="/shortlog/xyzzy?revcount=30&style=paper">less</a>
+  <a href="/shortlog/xyzzy?revcount=120&style=paper">more</a>
   | rev 1: <a href="/shortlog/43c799df6e75?style=paper">(0)</a> <a href="/shortlog/tip?style=paper">tip</a> 
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'graph/xyzzy?style=paper' | egrep $REVLINKS
-  <li><a href="/shortlog/a7c1559b7bba?style=paper">log</a></li>
-  <li><a href="/rev/a7c1559b7bba?style=paper">changeset</a></li>
-  <li><a href="/file/a7c1559b7bba?style=paper">browse</a></li>
-  <a href="/graph/1?revcount=30&style=paper">less</a>
-  <a href="/graph/1?revcount=120&style=paper">more</a>
+  <li><a href="/shortlog/xyzzy?style=paper">log</a></li>
+  <li><a href="/rev/xyzzy?style=paper">changeset</a></li>
+  <li><a href="/file/xyzzy?style=paper">browse</a></li>
+  <a href="/graph/xyzzy?revcount=30&style=paper">less</a>
+  <a href="/graph/xyzzy?revcount=120&style=paper">more</a>
   | rev 1: <a href="/graph/43c799df6e75?style=paper">(0)</a> <a href="/graph/tip?style=paper">tip</a> 
-  <a href="/graph/1?revcount=30&style=paper">less</a>
-  <a href="/graph/1?revcount=120&style=paper">more</a>
+  <a href="/graph/xyzzy?revcount=30&style=paper">less</a>
+  <a href="/graph/xyzzy?revcount=120&style=paper">more</a>
   | rev 1: <a href="/graph/43c799df6e75?style=paper">(0)</a> <a href="/graph/tip?style=paper">tip</a> 
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/xyzzy?style=paper' | egrep $REVLINKS
-  <li><a href="/shortlog/a7c1559b7bba?style=paper">log</a></li>
-  <li><a href="/graph/a7c1559b7bba?style=paper">graph</a></li>
-  <li><a href="/rev/a7c1559b7bba?style=paper">changeset</a></li>
-  <a href="/archive/a7c1559b7bba.zip">zip</a>
-    <td class="name"><a href="/file/a7c1559b7bba/?style=paper">[up]</a></td>
-  <a href="/file/a7c1559b7bba/dir?style=paper">
-  <a href="/file/a7c1559b7bba/dir/?style=paper">
-  <a href="/file/a7c1559b7bba/foo?style=paper">
+  <li><a href="/shortlog/xyzzy?style=paper">log</a></li>
+  <li><a href="/graph/xyzzy?style=paper">graph</a></li>
+  <li><a href="/rev/xyzzy?style=paper">changeset</a></li>
+  <a href="/archive/xyzzy.zip">zip</a>
+    <td class="name"><a href="/file/xyzzy/?style=paper">[up]</a></td>
+  <a href="/file/xyzzy/dir?style=paper">
+  <a href="/file/xyzzy/dir/?style=paper">
+  <a href="/file/xyzzy/foo?style=paper">
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/xyzzy/foo?style=paper' | egrep $REVLINKS
-  <li><a href="/shortlog/a7c1559b7bba?style=paper">log</a></li>
-  <li><a href="/graph/a7c1559b7bba?style=paper">graph</a></li>
-  <li><a href="/rev/a7c1559b7bba?style=paper">changeset</a></li>
-  <li><a href="/file/a7c1559b7bba/?style=paper">browse</a></li>
+  <li><a href="/shortlog/xyzzy?style=paper">log</a></li>
+  <li><a href="/graph/xyzzy?style=paper">graph</a></li>
+  <li><a href="/rev/xyzzy?style=paper">changeset</a></li>
+  <li><a href="/file/xyzzy/?style=paper">browse</a></li>
   <li><a href="/file/tip/foo?style=paper">latest</a></li>
-  <li><a href="/diff/a7c1559b7bba/foo?style=paper">diff</a></li>
-  <li><a href="/comparison/a7c1559b7bba/foo?style=paper">comparison</a></li>
-  <li><a href="/annotate/a7c1559b7bba/foo?style=paper">annotate</a></li>
-  <li><a href="/log/a7c1559b7bba/foo?style=paper">file log</a></li>
-  <li><a href="/raw-file/a7c1559b7bba/foo">raw</a></li>
+  <li><a href="/diff/xyzzy/foo?style=paper">diff</a></li>
+  <li><a href="/comparison/xyzzy/foo?style=paper">comparison</a></li>
+  <li><a href="/annotate/xyzzy/foo?style=paper">annotate</a></li>
+  <li><a href="/log/xyzzy/foo?style=paper">file log</a></li>
+  <li><a href="/raw-file/xyzzy/foo">raw</a></li>
    <td class="author"><a href="/file/43c799df6e75/foo?style=paper">43c799df6e75</a> </td>
    <td class="author"><a href="/file/9d8c40cba617/foo?style=paper">9d8c40cba617</a> </td>
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log/xyzzy/foo?style=paper' | egrep $REVLINKS
      href="/atom-log/tip/foo" title="Atom feed for test:foo" />
      href="/rss-log/tip/foo" title="RSS feed for test:foo" />
-  <li><a href="/shortlog/a7c1559b7bba?style=paper">log</a></li>
-  <li><a href="/graph/a7c1559b7bba?style=paper">graph</a></li>
-  <li><a href="/rev/a7c1559b7bba?style=paper">changeset</a></li>
-  <li><a href="/file/a7c1559b7bba?style=paper">browse</a></li>
-  <li><a href="/file/a7c1559b7bba/foo?style=paper">file</a></li>
-  <li><a href="/diff/a7c1559b7bba/foo?style=paper">diff</a></li>
-  <li><a href="/comparison/a7c1559b7bba/foo?style=paper">comparison</a></li>
-  <li><a href="/annotate/a7c1559b7bba/foo?style=paper">annotate</a></li>
-  <li><a href="/raw-file/a7c1559b7bba/foo">raw</a></li>
+  <li><a href="/shortlog/xyzzy?style=paper">log</a></li>
+  <li><a href="/graph/xyzzy?style=paper">graph</a></li>
+  <li><a href="/rev/xyzzy?style=paper">changeset</a></li>
+  <li><a href="/file/xyzzy?style=paper">browse</a></li>
+  <li><a href="/file/xyzzy/foo?style=paper">file</a></li>
+  <li><a href="/diff/xyzzy/foo?style=paper">diff</a></li>
+  <li><a href="/comparison/xyzzy/foo?style=paper">comparison</a></li>
+  <li><a href="/annotate/xyzzy/foo?style=paper">annotate</a></li>
+  <li><a href="/raw-file/xyzzy/foo">raw</a></li>
   <a href="/atom-log/a7c1559b7bba/foo" title="subscribe to atom feed">
-  <a href="/log/a7c1559b7bba/foo?revcount=30&style=paper">less</a>
-  <a href="/log/a7c1559b7bba/foo?revcount=120&style=paper">more</a>
+  <a href="/log/xyzzy/foo?revcount=30&style=paper">less</a>
+  <a href="/log/xyzzy/foo?revcount=120&style=paper">more</a>
   | <a href="/log/43c799df6e75/foo?style=paper">(0)</a> <a href="/log/tip/foo?style=paper">tip</a> </div>
      <a href="/rev/a7c1559b7bba?style=paper">second</a>
      <a href="/rev/43c799df6e75?style=paper">first</a>
-  <a href="/log/a7c1559b7bba/foo?revcount=30&style=paper">less</a>
-  <a href="/log/a7c1559b7bba/foo?revcount=120&style=paper">more</a>
+  <a href="/log/xyzzy/foo?revcount=30&style=paper">less</a>
+  <a href="/log/xyzzy/foo?revcount=120&style=paper">more</a>
   | <a href="/log/43c799df6e75/foo?style=paper">(0)</a> <a href="/log/tip/foo?style=paper">tip</a> 
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'annotate/xyzzy/foo?style=paper' | egrep $REVLINKS
-  <li><a href="/shortlog/a7c1559b7bba?style=paper">log</a></li>
-  <li><a href="/graph/a7c1559b7bba?style=paper">graph</a></li>
-  <li><a href="/rev/a7c1559b7bba?style=paper">changeset</a></li>
-  <li><a href="/file/a7c1559b7bba/?style=paper">browse</a></li>
-  <li><a href="/file/a7c1559b7bba/foo?style=paper">file</a></li>
+  <li><a href="/shortlog/xyzzy?style=paper">log</a></li>
+  <li><a href="/graph/xyzzy?style=paper">graph</a></li>
+  <li><a href="/rev/xyzzy?style=paper">changeset</a></li>
+  <li><a href="/file/xyzzy/?style=paper">browse</a></li>
+  <li><a href="/file/xyzzy/foo?style=paper">file</a></li>
   <li><a href="/file/tip/foo?style=paper">latest</a></li>
-  <li><a href="/diff/a7c1559b7bba/foo?style=paper">diff</a></li>
-  <li><a href="/comparison/a7c1559b7bba/foo?style=paper">comparison</a></li>
-  <li><a href="/log/a7c1559b7bba/foo?style=paper">file log</a></li>
-  <li><a href="/raw-annotate/a7c1559b7bba/foo">raw</a></li>
+  <li><a href="/diff/xyzzy/foo?style=paper">diff</a></li>
+  <li><a href="/comparison/xyzzy/foo?style=paper">comparison</a></li>
+  <li><a href="/log/xyzzy/foo?style=paper">file log</a></li>
+  <li><a href="/raw-annotate/xyzzy/foo">raw</a></li>
    <td class="author"><a href="/file/43c799df6e75/foo?style=paper">43c799df6e75</a> </td>
    <td class="author"><a href="/file/9d8c40cba617/foo?style=paper">9d8c40cba617</a> </td>
   <a href="/annotate/43c799df6e75/foo?style=paper#l1"
   <a href="/annotate/a7c1559b7bba/foo?style=paper#l2"
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'diff/xyzzy/foo?style=paper' | egrep $REVLINKS
-  <li><a href="/shortlog/a7c1559b7bba?style=paper">log</a></li>
-  <li><a href="/graph/a7c1559b7bba?style=paper">graph</a></li>
-  <li><a href="/rev/a7c1559b7bba?style=paper">changeset</a></li>
-  <li><a href="/file/a7c1559b7bba?style=paper">browse</a></li>
-  <li><a href="/file/a7c1559b7bba/foo?style=paper">file</a></li>
+  <li><a href="/shortlog/xyzzy?style=paper">log</a></li>
+  <li><a href="/graph/xyzzy?style=paper">graph</a></li>
+  <li><a href="/rev/xyzzy?style=paper">changeset</a></li>
+  <li><a href="/file/xyzzy?style=paper">browse</a></li>
+  <li><a href="/file/xyzzy/foo?style=paper">file</a></li>
   <li><a href="/file/tip/foo?style=paper">latest</a></li>
-  <li><a href="/comparison/a7c1559b7bba/foo?style=paper">comparison</a></li>
-  <li><a href="/annotate/a7c1559b7bba/foo?style=paper">annotate</a></li>
-  <li><a href="/log/a7c1559b7bba/foo?style=paper">file log</a></li>
-  <li><a href="/raw-file/a7c1559b7bba/foo">raw</a></li>
+  <li><a href="/comparison/xyzzy/foo?style=paper">comparison</a></li>
+  <li><a href="/annotate/xyzzy/foo?style=paper">annotate</a></li>
+  <li><a href="/log/xyzzy/foo?style=paper">file log</a></li>
+  <li><a href="/raw-file/xyzzy/foo">raw</a></li>
    <td><a href="/file/43c799df6e75/foo?style=paper">43c799df6e75</a> </td>
    <td><a href="/file/9d8c40cba617/foo?style=paper">9d8c40cba617</a> </td>
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'comparison/xyzzy/foo?style=paper' | egrep $REVLINKS
-  <li><a href="/shortlog/a7c1559b7bba?style=paper">log</a></li>
-  <li><a href="/graph/a7c1559b7bba?style=paper">graph</a></li>
-  <li><a href="/rev/a7c1559b7bba?style=paper">changeset</a></li>
-  <li><a href="/file/a7c1559b7bba?style=paper">browse</a></li>
-  <li><a href="/file/a7c1559b7bba/foo?style=paper">file</a></li>
+  <li><a href="/shortlog/xyzzy?style=paper">log</a></li>
+  <li><a href="/graph/xyzzy?style=paper">graph</a></li>
+  <li><a href="/rev/xyzzy?style=paper">changeset</a></li>
+  <li><a href="/file/xyzzy?style=paper">browse</a></li>
+  <li><a href="/file/xyzzy/foo?style=paper">file</a></li>
   <li><a href="/file/tip/foo?style=paper">latest</a></li>
-  <li><a href="/diff/a7c1559b7bba/foo?style=paper">diff</a></li>
-  <li><a href="/annotate/a7c1559b7bba/foo?style=paper">annotate</a></li>
-  <li><a href="/log/a7c1559b7bba/foo?style=paper">file log</a></li>
-  <li><a href="/raw-file/a7c1559b7bba/foo">raw</a></li>
+  <li><a href="/diff/xyzzy/foo?style=paper">diff</a></li>
+  <li><a href="/annotate/xyzzy/foo?style=paper">annotate</a></li>
+  <li><a href="/log/xyzzy/foo?style=paper">file log</a></li>
+  <li><a href="/raw-file/xyzzy/foo">raw</a></li>
    <td><a href="/file/43c799df6e75/foo?style=paper">43c799df6e75</a> </td>
    <td><a href="/file/9d8c40cba617/foo?style=paper">9d8c40cba617</a> </td>
 
 (De)referencing symbolic revisions (coal)
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'shortlog?style=coal' | egrep $REVLINKS
-  <li><a href="/graph/9d8c40cba617?style=coal">graph</a></li>
-  <li><a href="/rev/9d8c40cba617?style=coal">changeset</a></li>
-  <li><a href="/file/9d8c40cba617?style=coal">browse</a></li>
+  <li><a href="/graph/tip?style=coal">graph</a></li>
+  <li><a href="/rev/tip?style=coal">changeset</a></li>
+  <li><a href="/file/tip?style=coal">browse</a></li>
   <a href="/archive/tip.zip">zip</a>
-  <a href="/shortlog/2?revcount=30&style=coal">less</a>
-  <a href="/shortlog/2?revcount=120&style=coal">more</a>
+  <a href="/shortlog/tip?revcount=30&style=coal">less</a>
+  <a href="/shortlog/tip?revcount=120&style=coal">more</a>
   | rev 2: <a href="/shortlog/43c799df6e75?style=coal">(0)</a> <a href="/shortlog/tip?style=coal">tip</a> 
      <a href="/rev/9d8c40cba617?style=coal">third</a>
      <a href="/rev/a7c1559b7bba?style=coal">second</a>
      <a href="/rev/43c799df6e75?style=coal">first</a>
-  <a href="/shortlog/2?revcount=30&style=coal">less</a>
-  <a href="/shortlog/2?revcount=120&style=coal">more</a>
+  <a href="/shortlog/tip?revcount=30&style=coal">less</a>
+  <a href="/shortlog/tip?revcount=120&style=coal">more</a>
   | rev 2: <a href="/shortlog/43c799df6e75?style=coal">(0)</a> <a href="/shortlog/tip?style=coal">tip</a> 
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'graph?style=coal' | egrep $REVLINKS
-  <li><a href="/shortlog/9d8c40cba617?style=coal">log</a></li>
-  <li><a href="/rev/9d8c40cba617?style=coal">changeset</a></li>
-  <li><a href="/file/9d8c40cba617?style=coal">browse</a></li>
-  <a href="/graph/2?revcount=30&style=coal">less</a>
-  <a href="/graph/2?revcount=120&style=coal">more</a>
+  <li><a href="/shortlog/tip?style=coal">log</a></li>
+  <li><a href="/rev/tip?style=coal">changeset</a></li>
+  <li><a href="/file/tip?style=coal">browse</a></li>
+  <a href="/graph/tip?revcount=30&style=coal">less</a>
+  <a href="/graph/tip?revcount=120&style=coal">more</a>
   | rev 2: <a href="/graph/43c799df6e75?style=coal">(0)</a> <a href="/graph/tip?style=coal">tip</a> 
-  <a href="/graph/2?revcount=30&style=coal">less</a>
-  <a href="/graph/2?revcount=120&style=coal">more</a>
+  <a href="/graph/tip?revcount=30&style=coal">less</a>
+  <a href="/graph/tip?revcount=120&style=coal">more</a>
   | rev 2: <a href="/graph/43c799df6e75?style=coal">(0)</a> <a href="/graph/tip?style=coal">tip</a> 
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file?style=coal' | egrep $REVLINKS
-  <li><a href="/shortlog/9d8c40cba617?style=coal">log</a></li>
-  <li><a href="/graph/9d8c40cba617?style=coal">graph</a></li>
-  <li><a href="/rev/9d8c40cba617?style=coal">changeset</a></li>
-  <a href="/archive/9d8c40cba617.zip">zip</a>
-    <td class="name"><a href="/file/9d8c40cba617/?style=coal">[up]</a></td>
-  <a href="/file/9d8c40cba617/dir?style=coal">
-  <a href="/file/9d8c40cba617/dir/?style=coal">
-  <a href="/file/9d8c40cba617/foo?style=coal">
+  <li><a href="/shortlog/tip?style=coal">log</a></li>
+  <li><a href="/graph/tip?style=coal">graph</a></li>
+  <li><a href="/rev/tip?style=coal">changeset</a></li>
+  <a href="/archive/tip.zip">zip</a>
+    <td class="name"><a href="/file/tip/?style=coal">[up]</a></td>
+  <a href="/file/tip/dir?style=coal">
+  <a href="/file/tip/dir/?style=coal">
+  <a href="/file/tip/foo?style=coal">
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'shortlog?style=coal&rev=all()' | egrep $REVLINKS
      <a href="/rev/9d8c40cba617?style=coal">third</a>
@@ -247,127 +247,127 @@
      <a href="/rev/43c799df6e75?style=coal">first</a>
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'rev/xyzzy?style=coal' | egrep $REVLINKS
-   <li><a href="/shortlog/a7c1559b7bba?style=coal">log</a></li>
-   <li><a href="/graph/a7c1559b7bba?style=coal">graph</a></li>
-   <li><a href="/raw-rev/a7c1559b7bba?style=coal">raw</a></li>
-   <li><a href="/file/a7c1559b7bba?style=coal">browse</a></li>
-  <a href="/archive/a7c1559b7bba.zip">zip</a>
+   <li><a href="/shortlog/xyzzy?style=coal">log</a></li>
+   <li><a href="/graph/xyzzy?style=coal">graph</a></li>
+   <li><a href="/raw-rev/xyzzy?style=coal">raw</a></li>
+   <li><a href="/file/xyzzy?style=coal">browse</a></li>
+  <a href="/archive/xyzzy.zip">zip</a>
    <td class="author"><a href="/rev/43c799df6e75?style=coal">43c799df6e75</a> </td>
    <td class="author"> <a href="/rev/9d8c40cba617?style=coal">9d8c40cba617</a></td>
    <td class="files"><a href="/file/a7c1559b7bba/foo?style=coal">foo</a> </td>
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'shortlog/xyzzy?style=coal' | egrep $REVLINKS
-  <li><a href="/graph/a7c1559b7bba?style=coal">graph</a></li>
-  <li><a href="/rev/a7c1559b7bba?style=coal">changeset</a></li>
-  <li><a href="/file/a7c1559b7bba?style=coal">browse</a></li>
-  <a href="/archive/tip.zip">zip</a>
-  <a href="/shortlog/1?revcount=30&style=coal">less</a>
-  <a href="/shortlog/1?revcount=120&style=coal">more</a>
+  <li><a href="/graph/xyzzy?style=coal">graph</a></li>
+  <li><a href="/rev/xyzzy?style=coal">changeset</a></li>
+  <li><a href="/file/xyzzy?style=coal">browse</a></li>
+  <a href="/archive/xyzzy.zip">zip</a>
+  <a href="/shortlog/xyzzy?revcount=30&style=coal">less</a>
+  <a href="/shortlog/xyzzy?revcount=120&style=coal">more</a>
   | rev 1: <a href="/shortlog/43c799df6e75?style=coal">(0)</a> <a href="/shortlog/tip?style=coal">tip</a> 
      <a href="/rev/a7c1559b7bba?style=coal">second</a>
      <a href="/rev/43c799df6e75?style=coal">first</a>
-  <a href="/shortlog/1?revcount=30&style=coal">less</a>
-  <a href="/shortlog/1?revcount=120&style=coal">more</a>
+  <a href="/shortlog/xyzzy?revcount=30&style=coal">less</a>
+  <a href="/shortlog/xyzzy?revcount=120&style=coal">more</a>
   | rev 1: <a href="/shortlog/43c799df6e75?style=coal">(0)</a> <a href="/shortlog/tip?style=coal">tip</a> 
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'graph/xyzzy?style=coal' | egrep $REVLINKS
-  <li><a href="/shortlog/a7c1559b7bba?style=coal">log</a></li>
-  <li><a href="/rev/a7c1559b7bba?style=coal">changeset</a></li>
-  <li><a href="/file/a7c1559b7bba?style=coal">browse</a></li>
-  <a href="/graph/1?revcount=30&style=coal">less</a>
-  <a href="/graph/1?revcount=120&style=coal">more</a>
+  <li><a href="/shortlog/xyzzy?style=coal">log</a></li>
+  <li><a href="/rev/xyzzy?style=coal">changeset</a></li>
+  <li><a href="/file/xyzzy?style=coal">browse</a></li>
+  <a href="/graph/xyzzy?revcount=30&style=coal">less</a>
+  <a href="/graph/xyzzy?revcount=120&style=coal">more</a>
   | rev 1: <a href="/graph/43c799df6e75?style=coal">(0)</a> <a href="/graph/tip?style=coal">tip</a> 
-  <a href="/graph/1?revcount=30&style=coal">less</a>
-  <a href="/graph/1?revcount=120&style=coal">more</a>
+  <a href="/graph/xyzzy?revcount=30&style=coal">less</a>
+  <a href="/graph/xyzzy?revcount=120&style=coal">more</a>
   | rev 1: <a href="/graph/43c799df6e75?style=coal">(0)</a> <a href="/graph/tip?style=coal">tip</a> 
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/xyzzy?style=coal' | egrep $REVLINKS
-  <li><a href="/shortlog/a7c1559b7bba?style=coal">log</a></li>
-  <li><a href="/graph/a7c1559b7bba?style=coal">graph</a></li>
-  <li><a href="/rev/a7c1559b7bba?style=coal">changeset</a></li>
-  <a href="/archive/a7c1559b7bba.zip">zip</a>
-    <td class="name"><a href="/file/a7c1559b7bba/?style=coal">[up]</a></td>
-  <a href="/file/a7c1559b7bba/dir?style=coal">
-  <a href="/file/a7c1559b7bba/dir/?style=coal">
-  <a href="/file/a7c1559b7bba/foo?style=coal">
+  <li><a href="/shortlog/xyzzy?style=coal">log</a></li>
+  <li><a href="/graph/xyzzy?style=coal">graph</a></li>
+  <li><a href="/rev/xyzzy?style=coal">changeset</a></li>
+  <a href="/archive/xyzzy.zip">zip</a>
+    <td class="name"><a href="/file/xyzzy/?style=coal">[up]</a></td>
+  <a href="/file/xyzzy/dir?style=coal">
+  <a href="/file/xyzzy/dir/?style=coal">
+  <a href="/file/xyzzy/foo?style=coal">
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/xyzzy/foo?style=coal' | egrep $REVLINKS
-  <li><a href="/shortlog/a7c1559b7bba?style=coal">log</a></li>
-  <li><a href="/graph/a7c1559b7bba?style=coal">graph</a></li>
-  <li><a href="/rev/a7c1559b7bba?style=coal">changeset</a></li>
-  <li><a href="/file/a7c1559b7bba/?style=coal">browse</a></li>
+  <li><a href="/shortlog/xyzzy?style=coal">log</a></li>
+  <li><a href="/graph/xyzzy?style=coal">graph</a></li>
+  <li><a href="/rev/xyzzy?style=coal">changeset</a></li>
+  <li><a href="/file/xyzzy/?style=coal">browse</a></li>
   <li><a href="/file/tip/foo?style=coal">latest</a></li>
-  <li><a href="/diff/a7c1559b7bba/foo?style=coal">diff</a></li>
-  <li><a href="/comparison/a7c1559b7bba/foo?style=coal">comparison</a></li>
-  <li><a href="/annotate/a7c1559b7bba/foo?style=coal">annotate</a></li>
-  <li><a href="/log/a7c1559b7bba/foo?style=coal">file log</a></li>
-  <li><a href="/raw-file/a7c1559b7bba/foo">raw</a></li>
+  <li><a href="/diff/xyzzy/foo?style=coal">diff</a></li>
+  <li><a href="/comparison/xyzzy/foo?style=coal">comparison</a></li>
+  <li><a href="/annotate/xyzzy/foo?style=coal">annotate</a></li>
+  <li><a href="/log/xyzzy/foo?style=coal">file log</a></li>
+  <li><a href="/raw-file/xyzzy/foo">raw</a></li>
    <td class="author"><a href="/file/43c799df6e75/foo?style=coal">43c799df6e75</a> </td>
    <td class="author"><a href="/file/9d8c40cba617/foo?style=coal">9d8c40cba617</a> </td>
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log/xyzzy/foo?style=coal' | egrep $REVLINKS
      href="/atom-log/tip/foo" title="Atom feed for test:foo" />
      href="/rss-log/tip/foo" title="RSS feed for test:foo" />
-  <li><a href="/shortlog/a7c1559b7bba?style=coal">log</a></li>
-  <li><a href="/graph/a7c1559b7bba?style=coal">graph</a></li>
-  <li><a href="/rev/a7c1559b7bba?style=coal">changeset</a></li>
-  <li><a href="/file/a7c1559b7bba?style=coal">browse</a></li>
-  <li><a href="/file/a7c1559b7bba/foo?style=coal">file</a></li>
-  <li><a href="/diff/a7c1559b7bba/foo?style=coal">diff</a></li>
-  <li><a href="/comparison/a7c1559b7bba/foo?style=coal">comparison</a></li>
-  <li><a href="/annotate/a7c1559b7bba/foo?style=coal">annotate</a></li>
-  <li><a href="/raw-file/a7c1559b7bba/foo">raw</a></li>
+  <li><a href="/shortlog/xyzzy?style=coal">log</a></li>
+  <li><a href="/graph/xyzzy?style=coal">graph</a></li>
+  <li><a href="/rev/xyzzy?style=coal">changeset</a></li>
+  <li><a href="/file/xyzzy?style=coal">browse</a></li>
+  <li><a href="/file/xyzzy/foo?style=coal">file</a></li>
+  <li><a href="/diff/xyzzy/foo?style=coal">diff</a></li>
+  <li><a href="/comparison/xyzzy/foo?style=coal">comparison</a></li>
+  <li><a href="/annotate/xyzzy/foo?style=coal">annotate</a></li>
+  <li><a href="/raw-file/xyzzy/foo">raw</a></li>
   <a href="/atom-log/a7c1559b7bba/foo" title="subscribe to atom feed">
-  <a href="/log/a7c1559b7bba/foo?revcount=30&style=coal">less</a>
-  <a href="/log/a7c1559b7bba/foo?revcount=120&style=coal">more</a>
+  <a href="/log/xyzzy/foo?revcount=30&style=coal">less</a>
+  <a href="/log/xyzzy/foo?revcount=120&style=coal">more</a>
   | <a href="/log/43c799df6e75/foo?style=coal">(0)</a> <a href="/log/tip/foo?style=coal">tip</a> </div>
      <a href="/rev/a7c1559b7bba?style=coal">second</a>
      <a href="/rev/43c799df6e75?style=coal">first</a>
-  <a href="/log/a7c1559b7bba/foo?revcount=30&style=coal">less</a>
-  <a href="/log/a7c1559b7bba/foo?revcount=120&style=coal">more</a>
+  <a href="/log/xyzzy/foo?revcount=30&style=coal">less</a>
+  <a href="/log/xyzzy/foo?revcount=120&style=coal">more</a>
   | <a href="/log/43c799df6e75/foo?style=coal">(0)</a> <a href="/log/tip/foo?style=coal">tip</a> 
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'annotate/xyzzy/foo?style=coal' | egrep $REVLINKS
-  <li><a href="/shortlog/a7c1559b7bba?style=coal">log</a></li>
-  <li><a href="/graph/a7c1559b7bba?style=coal">graph</a></li>
-  <li><a href="/rev/a7c1559b7bba?style=coal">changeset</a></li>
-  <li><a href="/file/a7c1559b7bba/?style=coal">browse</a></li>
-  <li><a href="/file/a7c1559b7bba/foo?style=coal">file</a></li>
+  <li><a href="/shortlog/xyzzy?style=coal">log</a></li>
+  <li><a href="/graph/xyzzy?style=coal">graph</a></li>
+  <li><a href="/rev/xyzzy?style=coal">changeset</a></li>
+  <li><a href="/file/xyzzy/?style=coal">browse</a></li>
+  <li><a href="/file/xyzzy/foo?style=coal">file</a></li>
   <li><a href="/file/tip/foo?style=coal">latest</a></li>
-  <li><a href="/diff/a7c1559b7bba/foo?style=coal">diff</a></li>
-  <li><a href="/comparison/a7c1559b7bba/foo?style=coal">comparison</a></li>
-  <li><a href="/log/a7c1559b7bba/foo?style=coal">file log</a></li>
-  <li><a href="/raw-annotate/a7c1559b7bba/foo">raw</a></li>
+  <li><a href="/diff/xyzzy/foo?style=coal">diff</a></li>
+  <li><a href="/comparison/xyzzy/foo?style=coal">comparison</a></li>
+  <li><a href="/log/xyzzy/foo?style=coal">file log</a></li>
+  <li><a href="/raw-annotate/xyzzy/foo">raw</a></li>
    <td class="author"><a href="/file/43c799df6e75/foo?style=coal">43c799df6e75</a> </td>
    <td class="author"><a href="/file/9d8c40cba617/foo?style=coal">9d8c40cba617</a> </td>
   <a href="/annotate/43c799df6e75/foo?style=coal#1"
   <a href="/annotate/a7c1559b7bba/foo?style=coal#2"
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'diff/xyzzy/foo?style=coal' | egrep $REVLINKS
-  <li><a href="/shortlog/a7c1559b7bba?style=coal">log</a></li>
-  <li><a href="/graph/a7c1559b7bba?style=coal">graph</a></li>
-  <li><a href="/rev/a7c1559b7bba?style=coal">changeset</a></li>
-  <li><a href="/file/a7c1559b7bba?style=coal">browse</a></li>
-  <li><a href="/file/a7c1559b7bba/foo?style=coal">file</a></li>
+  <li><a href="/shortlog/xyzzy?style=coal">log</a></li>
+  <li><a href="/graph/xyzzy?style=coal">graph</a></li>
+  <li><a href="/rev/xyzzy?style=coal">changeset</a></li>
+  <li><a href="/file/xyzzy?style=coal">browse</a></li>
+  <li><a href="/file/xyzzy/foo?style=coal">file</a></li>
   <li><a href="/file/tip/foo?style=coal">latest</a></li>
-  <li><a href="/comparison/a7c1559b7bba/foo?style=coal">comparison</a></li>
-  <li><a href="/annotate/a7c1559b7bba/foo?style=coal">annotate</a></li>
-  <li><a href="/log/a7c1559b7bba/foo?style=coal">file log</a></li>
-  <li><a href="/raw-file/a7c1559b7bba/foo">raw</a></li>
+  <li><a href="/comparison/xyzzy/foo?style=coal">comparison</a></li>
+  <li><a href="/annotate/xyzzy/foo?style=coal">annotate</a></li>
+  <li><a href="/log/xyzzy/foo?style=coal">file log</a></li>
+  <li><a href="/raw-file/xyzzy/foo">raw</a></li>
    <td><a href="/file/43c799df6e75/foo?style=coal">43c799df6e75</a> </td>
    <td><a href="/file/9d8c40cba617/foo?style=coal">9d8c40cba617</a> </td>
 
   $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'comparison/xyzzy/foo?style=coal' | egrep $REVLINKS
-  <li><a href="/shortlog/a7c1559b7bba?style=coal">log</a></li>
-  <li><a href="/graph/a7c1559b7bba?style=coal">graph</a></li>
-  <li><a href="/rev/a7c1559b7bba?style=coal">changeset</a></li>
-  <li><a href="/file/a7c1559b7bba?style=coal">browse</a></li>
-  <li><a href="/file/a7c1559b7bba/foo?style=coal">file</a></li>
+  <li><a href="/shortlog/xyzzy?style=coal">log</a></li>
+  <li><a href="/graph/xyzzy?style=coal">graph</a></li>
+  <li><a href="/rev/xyzzy?style=coal">changeset</a></li>
+  <li><a href="/file/xyzzy?style=coal">browse</a></li>
+  <li><a href="/file/xyzzy/foo?style=coal">file</a></li>
   <li><a href="/file/tip/foo?style=coal">latest</a></li>
-  <li><a href="/diff/a7c1559b7bba/foo?style=coal">diff</a></li>
-  <li><a href="/annotate/a7c1559b7bba/foo?style=coal">annotate</a></li>
-  <li><a href="/log/a7c1559b7bba/foo?style=coal">file log</a></li>
-  <li><a href="/raw-file/a7c1559b7bba/foo">raw</a></li>
+  <li><a href="/diff/xyzzy/foo?style=coal">diff</a></li>
+  <li><a href="/annotate/xyzzy/foo?style=coal">annotate</a></li>
+  <li><a href="/log/xyzzy/foo?style=coal">file log</a></li>
+  <li><a href="/raw-file/xyzzy/foo">raw</a></li>
    <td><a href="/file/43c799df6e75/foo?style=coal">43c799df6e75</a> </td>
    <td><a href="/file/9d8c40cba617/foo?style=coal">9d8c40cba617</a> </td>
 
--- a/tests/test-hgweb.t	Tue Jun 16 14:37:53 2015 +0800
+++ b/tests/test-hgweb.t	Tue Jun 16 16:07:39 2015 +0800
@@ -242,14 +242,14 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-  <li><a href="/shortlog/2ef0ac749a14">log</a></li>
-  <li><a href="/graph/2ef0ac749a14">graph</a></li>
+  <li><a href="/shortlog/tip">log</a></li>
+  <li><a href="/graph/tip">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/2ef0ac749a14">changeset</a></li>
+  <li><a href="/rev/tip">changeset</a></li>
   <li class="active">browse</li>
   </ul>
   <ul>
@@ -281,17 +281,17 @@
   </thead>
   <tbody class="stripes2">
   <tr class="fileline">
-    <td class="name"><a href="/file/2ef0ac749a14/">[up]</a></td>
+    <td class="name"><a href="/file/tip/">[up]</a></td>
     <td class="size"></td>
     <td class="permissions">drwxr-xr-x</td>
   </tr>
   
   <tr class="fileline">
   <td class="name">
-  <a href="/file/2ef0ac749a14/da">
+  <a href="/file/tip/da">
   <img src="/static/coal-folder.png" alt="dir."/> da/
   </a>
-  <a href="/file/2ef0ac749a14/da/">
+  <a href="/file/tip/da/">
   
   </a>
   </td>
@@ -301,7 +301,7 @@
   
   <tr class="fileline">
   <td class="filename">
-  <a href="/file/2ef0ac749a14/foo">
+  <a href="/file/tip/foo">
   <img src="/static/coal-file.png" alt="file"/> foo
   </a>
   </td>
--- a/tests/test-highlight.t	Tue Jun 16 14:37:53 2015 +0800
+++ b/tests/test-highlight.t	Tue Jun 16 16:07:39 2015 +0800
@@ -79,24 +79,24 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-  <li><a href="/shortlog/853dcd4de2a6">log</a></li>
-  <li><a href="/graph/853dcd4de2a6">graph</a></li>
+  <li><a href="/shortlog/tip">log</a></li>
+  <li><a href="/graph/tip">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   <ul>
-  <li><a href="/rev/853dcd4de2a6">changeset</a></li>
-  <li><a href="/file/853dcd4de2a6/">browse</a></li>
+  <li><a href="/rev/tip">changeset</a></li>
+  <li><a href="/file/tip/">browse</a></li>
   </ul>
   <ul>
   <li class="active">file</li>
   <li><a href="/file/tip/primes.py">latest</a></li>
-  <li><a href="/diff/853dcd4de2a6/primes.py">diff</a></li>
-  <li><a href="/comparison/853dcd4de2a6/primes.py">comparison</a></li>
-  <li><a href="/annotate/853dcd4de2a6/primes.py">annotate</a></li>
-  <li><a href="/log/853dcd4de2a6/primes.py">file log</a></li>
-  <li><a href="/raw-file/853dcd4de2a6/primes.py">raw</a></li>
+  <li><a href="/diff/tip/primes.py">diff</a></li>
+  <li><a href="/comparison/tip/primes.py">comparison</a></li>
+  <li><a href="/annotate/tip/primes.py">annotate</a></li>
+  <li><a href="/log/tip/primes.py">file log</a></li>
+  <li><a href="/raw-file/tip/primes.py">raw</a></li>
   </ul>
   <ul>
   <li><a href="/help">help</a></li>
@@ -209,25 +209,25 @@
   <img src="/static/hglogo.png" alt="mercurial" /></a>
   </div>
   <ul>
-  <li><a href="/shortlog/853dcd4de2a6">log</a></li>
-  <li><a href="/graph/853dcd4de2a6">graph</a></li>
+  <li><a href="/shortlog/tip">log</a></li>
+  <li><a href="/graph/tip">graph</a></li>
   <li><a href="/tags">tags</a></li>
   <li><a href="/bookmarks">bookmarks</a></li>
   <li><a href="/branches">branches</a></li>
   </ul>
   
   <ul>
-  <li><a href="/rev/853dcd4de2a6">changeset</a></li>
-  <li><a href="/file/853dcd4de2a6/">browse</a></li>
+  <li><a href="/rev/tip">changeset</a></li>
+  <li><a href="/file/tip/">browse</a></li>
   </ul>
   <ul>
-  <li><a href="/file/853dcd4de2a6/primes.py">file</a></li>
+  <li><a href="/file/tip/primes.py">file</a></li>
   <li><a href="/file/tip/primes.py">latest</a></li>
-  <li><a href="/diff/853dcd4de2a6/primes.py">diff</a></li>
-  <li><a href="/comparison/853dcd4de2a6/primes.py">comparison</a></li>
+  <li><a href="/diff/tip/primes.py">diff</a></li>
+  <li><a href="/comparison/tip/primes.py">comparison</a></li>
   <li class="active">annotate</li>
-  <li><a href="/log/853dcd4de2a6/primes.py">file log</a></li>
-  <li><a href="/raw-annotate/853dcd4de2a6/primes.py">raw</a></li>
+  <li><a href="/log/tip/primes.py">file log</a></li>
+  <li><a href="/raw-annotate/tip/primes.py">raw</a></li>
   </ul>
   <ul>
   <li><a href="/help">help</a></li>