diff tests/test-hgweb-empty.t @ 19093:6f27efc7db23 stable

hgweb: fix empty navigation detection For some obscure reason, changelog.node(0) returns nullid if changelog is empty. this break empty navigation detection. We fix this code by using the length of the changelog. Using the length have some issue with revision filtering but this is a small step in the right direction. Proper fix comes in later changeset.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Tue, 30 Apr 2013 15:11:12 +0200
parents d6ebdbdd70a5
children afc23eddc324
line wrap: on
line diff
--- a/tests/test-hgweb-empty.t	Tue Apr 30 14:56:33 2013 +0100
+++ b/tests/test-hgweb-empty.t	Tue Apr 30 15:11:12 2013 +0200
@@ -70,7 +70,7 @@
   <div class="navigate">
   <a href="/shortlog/-1?revcount=30">less</a>
   <a href="/shortlog/-1?revcount=120">more</a>
-  | rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a> 
+  | rev -1: 
   </div>
   
   <table class="bigtable">
@@ -85,7 +85,7 @@
   <div class="navigate">
   <a href="/shortlog/-1?revcount=30">less</a>
   <a href="/shortlog/-1?revcount=120">more</a>
-  | rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a> 
+  | rev -1: 
   </div>
   
   </div>
@@ -97,6 +97,8 @@
   </body>
   </html>
   
+  $ echo babar
+  babar
   $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log')
   200 Script output follows
   
@@ -161,7 +163,7 @@
   <div class="navigate">
   <a href="/shortlog/-1?revcount=5">less</a>
   <a href="/shortlog/-1?revcount=20">more</a>
-  | rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a> 
+  | rev -1: 
   </div>
   
   <table class="bigtable">
@@ -176,7 +178,7 @@
   <div class="navigate">
   <a href="/shortlog/-1?revcount=5">less</a>
   <a href="/shortlog/-1?revcount=20">more</a>
-  | rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a> 
+  | rev -1: 
   </div>
   
   </div>
@@ -250,7 +252,7 @@
   <div class="navigate">
   <a href="/graph/-1?revcount=30">less</a>
   <a href="/graph/-1?revcount=120">more</a>
-  | rev -1: <a href="/graph/000000000000">(0)</a> <a href="/graph/tip">tip</a> 
+  | rev -1: 
   </div>
   
   <noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript>
@@ -320,7 +322,7 @@
   <div class="navigate">
   <a href="/graph/-1?revcount=30">less</a>
   <a href="/graph/-1?revcount=120">more</a>
-  | rev -1: <a href="/graph/000000000000">(0)</a> <a href="/graph/tip">tip</a> 
+  | rev -1: 
   </div>
   
   </div>