##// END OF EJS Templates
hgweb: fix empty navigation detection...
Pierre-Yves David -
r19093:6f27efc7 stable
parent child Browse files
Show More
@@ -51,11 +51,7 b' class revnav(object):'
51
51
52 def __nonzero__(self):
52 def __nonzero__(self):
53 """return True if any revision to navigate over"""
53 """return True if any revision to navigate over"""
54 try:
54 return bool(len(self._revlog))
55 self._revlog.node(0)
56 return True
57 except error.RepoError:
58 return False
59
55
60 def hex(self, rev):
56 def hex(self, rev):
61 return hex(self._revlog.node(rev))
57 return hex(self._revlog.node(rev))
@@ -70,7 +70,7 b' Some tests for hgweb in an empty reposit'
70 <div class="navigate">
70 <div class="navigate">
71 <a href="/shortlog/-1?revcount=30">less</a>
71 <a href="/shortlog/-1?revcount=30">less</a>
72 <a href="/shortlog/-1?revcount=120">more</a>
72 <a href="/shortlog/-1?revcount=120">more</a>
73 | rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a>
73 | rev -1:
74 </div>
74 </div>
75
75
76 <table class="bigtable">
76 <table class="bigtable">
@@ -85,7 +85,7 b' Some tests for hgweb in an empty reposit'
85 <div class="navigate">
85 <div class="navigate">
86 <a href="/shortlog/-1?revcount=30">less</a>
86 <a href="/shortlog/-1?revcount=30">less</a>
87 <a href="/shortlog/-1?revcount=120">more</a>
87 <a href="/shortlog/-1?revcount=120">more</a>
88 | rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a>
88 | rev -1:
89 </div>
89 </div>
90
90
91 </div>
91 </div>
@@ -97,6 +97,8 b' Some tests for hgweb in an empty reposit'
97 </body>
97 </body>
98 </html>
98 </html>
99
99
100 $ echo babar
101 babar
100 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log')
102 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log')
101 200 Script output follows
103 200 Script output follows
102
104
@@ -161,7 +163,7 b' Some tests for hgweb in an empty reposit'
161 <div class="navigate">
163 <div class="navigate">
162 <a href="/shortlog/-1?revcount=5">less</a>
164 <a href="/shortlog/-1?revcount=5">less</a>
163 <a href="/shortlog/-1?revcount=20">more</a>
165 <a href="/shortlog/-1?revcount=20">more</a>
164 | rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a>
166 | rev -1:
165 </div>
167 </div>
166
168
167 <table class="bigtable">
169 <table class="bigtable">
@@ -176,7 +178,7 b' Some tests for hgweb in an empty reposit'
176 <div class="navigate">
178 <div class="navigate">
177 <a href="/shortlog/-1?revcount=5">less</a>
179 <a href="/shortlog/-1?revcount=5">less</a>
178 <a href="/shortlog/-1?revcount=20">more</a>
180 <a href="/shortlog/-1?revcount=20">more</a>
179 | rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a>
181 | rev -1:
180 </div>
182 </div>
181
183
182 </div>
184 </div>
@@ -250,7 +252,7 b' Some tests for hgweb in an empty reposit'
250 <div class="navigate">
252 <div class="navigate">
251 <a href="/graph/-1?revcount=30">less</a>
253 <a href="/graph/-1?revcount=30">less</a>
252 <a href="/graph/-1?revcount=120">more</a>
254 <a href="/graph/-1?revcount=120">more</a>
253 | rev -1: <a href="/graph/000000000000">(0)</a> <a href="/graph/tip">tip</a>
255 | rev -1:
254 </div>
256 </div>
255
257
256 <noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript>
258 <noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript>
@@ -320,7 +322,7 b' Some tests for hgweb in an empty reposit'
320 <div class="navigate">
322 <div class="navigate">
321 <a href="/graph/-1?revcount=30">less</a>
323 <a href="/graph/-1?revcount=30">less</a>
322 <a href="/graph/-1?revcount=120">more</a>
324 <a href="/graph/-1?revcount=120">more</a>
323 | rev -1: <a href="/graph/000000000000">(0)</a> <a href="/graph/tip">tip</a>
325 | rev -1:
324 </div>
326 </div>
325
327
326 </div>
328 </div>
General Comments 0
You need to be logged in to leave comments. Login now