Improved hgweb test.
The hgweb fix in
069b29656401 aimed at restoring the "back" link in hgweb's
filelog that has been lost in
62e0bb41e682. However, the previous version of
this test ran the filelog command on a file with only a single filelog entry.
In this case, the previous hgweb version did not exhibit the bug. The error
condition is now correctly tested with a filelog of 2 entries.
--- a/tests/test-hgweb-filelog Mon Jan 12 09:57:52 2009 +0100
+++ b/tests/test-hgweb-filelog Mon Jan 12 13:20:09 2009 +0100
@@ -19,6 +19,9 @@
hg mv b c
hg ci -m "mv b"
+echo c >> c
+hg ci -m "change c"
+
hg log -p
hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
--- a/tests/test-hgweb-filelog.out Mon Jan 12 09:57:52 2009 +0100
+++ b/tests/test-hgweb-filelog.out Mon Jan 12 13:20:09 2009 +0100
@@ -1,8 +1,20 @@
adding b
adding a
adding a
+changeset: 6:38d962e6234d
+tag: tip
+user: test
+date: Thu Jan 01 00:00:00 1970 +0000
+summary: change c
+
+diff -r a3b6a9e4507e -r 38d962e6234d c
+--- a/c Thu Jan 01 00:00:00 1970 +0000
++++ b/c Thu Jan 01 00:00:00 1970 +0000
+@@ -1,1 +1,2 @@
+ b
++c
+
changeset: 5:a3b6a9e4507e
-tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: mv b
@@ -474,8 +486,8 @@
<a href="/shortlog?style=spartan">shortlog</a>
<a href="/graph?style=spartan">graph</a>
<a href="/tags?style=spartan">tags</a>
-<a href="/file/a3b6a9e4507e/c?style=spartan">file</a>
-<a href="/annotate/a3b6a9e4507e/c?style=spartan">annotate</a>
+<a href="/file/38d962e6234d/c?style=spartan">file</a>
+<a href="/annotate/38d962e6234d/c?style=spartan">annotate</a>
<a type="application/rss+xml" href="/rss-log/tip/c">rss</a>
<a type="application/atom+xml" href="/atom-log/tip/c" title="Atom feed for test:c">atom</a>
</div>
@@ -487,6 +499,31 @@
<table class="logEntry parity0">
<tr>
<th class="age">many years ago:</th>
+ <th class="firstline"><a href="/rev/38d962e6234d?style=spartan">change c</a></th>
+ </tr>
+ <tr>
+ <th class="revision">revision 1:</td>
+ <td class="node">
+ <a href="/file/38d962e6234d/c?style=spartan">38d962e6234d</a>
+ <a href="/diff/38d962e6234d/c?style=spartan">(diff)</a>
+ <a href="/annotate/38d962e6234d/c?style=spartan">(annotate)</a>
+ </td>
+ </tr>
+
+ <tr>
+ <th class="author">author:</th>
+ <td class="author">test</td>
+ </tr>
+ <tr>
+ <th class="date">date:</th>
+ <td class="date">Thu Jan 01 00:00:00 1970 +0000</td>
+ </tr>
+</table>
+
+
+<table class="logEntry parity1">
+ <tr>
+ <th class="age">many years ago:</th>
<th class="firstline"><a href="/rev/a3b6a9e4507e?style=spartan">mv b</a></th>
</tr>
<tr>