diff tests/test-hgweb-commands.t @ 25526:32f76eccbced

hgweb: don't point file links at tip hash where it doesn't make sense Some pages, e.g. bookmarks, help and summary don't have a meaningful revision context: they always either show information about tip or about the whole repo (and not about any specific changeset). And error pages can just show hgweb error messages, not related to any repo or changeset. Having a hash in the links worked (even when '{node|short}' resolved to an empty string on error pages), but seeing pages without revision context provide links with hashes is a bit confusing (unless you keep current tip hash in your head at all times) and not consistent with other template styles and other links on the same page: they don't have a hash. Let's just link to '/file', which is equal to '/file/tip'.
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 12 Jun 2015 18:34:10 +0800
parents e0c09398c237
children dd89304687a3
line wrap: on
line diff
--- a/tests/test-hgweb-commands.t	Fri Jun 12 16:09:59 2015 +0800
+++ b/tests/test-hgweb-commands.t	Fri Jun 12 18:34:10 2015 +0800
@@ -1525,7 +1525,7 @@
   <a href="/tags?style=gitweb">tags</a> |
   <a href="/bookmarks?style=gitweb">bookmarks</a> |
   <a href="/branches?style=gitweb">branches</a> |
-  <a href="/file/cad8025a2e87?style=gitweb">files</a> |
+  <a href="/file?style=gitweb">files</a> |
   <a href="/help?style=gitweb">help</a>
   <br/>
   </div>