comparison tests/test-hgweb-diffs.t @ 35064:9acc0360ff67

hgweb: move changeset "tags" to a template in map file (paper and coal) This patch puts all these changeset "tags" into one template shared everywhere in paper and coal themes. But it should be noted that some of the templates had different sets of tags, in some cases it was intended, in others - most likely not. First, what's up with all these different ways to get changeset's branch. There are actually 3 ways to do it in hgweb, they can all be seen in this patch; "branches", "inbranch" and "branch". They are all lists that consist of 1 or 0 items: - "branches" has ctx.branch() if current changeset is the tip of that branch - "inbranch" has ctx.branch() if current changeset is _not_ the tip of that branch and the branch is not "default" - "branch" aka "changesetbranch" has ctx.branch() if the branch is not "default" The majority of cases (7 vs 2 + /graph) in paper theme used only option 3, which meant that "default" was never displayed. But other parts of the theme disagreed with this and used option 1 and option 2 together. For example, the default view (log) displays "default" on the branch tip (can be seen right about now on m-s.o/repo/hg), but it disappears when you click on the commit. Also, using option 3 alone meant that there was no way to tell if a changeset is the tip of its branch or not (it was always assumed that it's not, see how some css classes change from "branchname" to the correct "branchhead" in tests) -- so the two different css styles that exist in paper just for this were underused. I think this patch improves the situation, even though it changes the old (even if inconsistent) behavior. The new behavior matches that of gitweb and monoblue.
author Anton Shestakov <av6@dwimlabs.net>
date Wed, 15 Nov 2017 23:55:09 +0800
parents eb586ed5d8ce
children a1de4ffaa7a8
comparison
equal deleted inserted replaced
35063:52790352dd05 35064:9acc0360ff67
252 252
253 <div class="main"> 253 <div class="main">
254 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> 254 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
255 <h3> 255 <h3>
256 diff b @ 1:<a href="/rev/559edbd9ed20">559edbd9ed20</a> 256 diff b @ 1:<a href="/rev/559edbd9ed20">559edbd9ed20</a>
257 <span class="tag">tip</span> 257 <span class="branchhead">default</span> <span class="tag">tip</span>
258 </h3> 258 </h3>
259 259
260 260
261 <form class="search" action="/log"> 261 <form class="search" action="/log">
262 262
534 534
535 <div class="main"> 535 <div class="main">
536 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> 536 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
537 <h3> 537 <h3>
538 diff a @ 1:<a href="/rev/559edbd9ed20">559edbd9ed20</a> 538 diff a @ 1:<a href="/rev/559edbd9ed20">559edbd9ed20</a>
539 <span class="tag">tip</span> 539 <span class="branchhead">default</span> <span class="tag">tip</span>
540 </h3> 540 </h3>
541 541
542 542
543 <form class="search" action="/log"> 543 <form class="search" action="/log">
544 544
770 770
771 <div class="main"> 771 <div class="main">
772 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> 772 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
773 <h3> 773 <h3>
774 comparison a @ 2:<a href="/rev/d73db4d812ff">d73db4d812ff</a> 774 comparison a @ 2:<a href="/rev/d73db4d812ff">d73db4d812ff</a>
775 <span class="tag">tip</span> 775 <span class="branchhead">default</span> <span class="tag">tip</span>
776 </h3> 776 </h3>
777 777
778 778
779 <form class="search" action="/log"> 779 <form class="search" action="/log">
780 780
902 902
903 <div class="main"> 903 <div class="main">
904 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> 904 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
905 <h3> 905 <h3>
906 comparison a @ 3:<a href="/rev/20e80271eb7a">20e80271eb7a</a> 906 comparison a @ 3:<a href="/rev/20e80271eb7a">20e80271eb7a</a>
907 <span class="tag">tip</span> 907 <span class="branchhead">default</span> <span class="tag">tip</span>
908 </h3> 908 </h3>
909 909
910 910
911 <form class="search" action="/log"> 911 <form class="search" action="/log">
912 912
1040 1040
1041 <div class="main"> 1041 <div class="main">
1042 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> 1042 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1043 <h3> 1043 <h3>
1044 comparison e @ 5:<a href="/rev/41d9fc4a6ae1">41d9fc4a6ae1</a> 1044 comparison e @ 5:<a href="/rev/41d9fc4a6ae1">41d9fc4a6ae1</a>
1045 <span class="tag">tip</span> 1045 <span class="branchhead">default</span> <span class="tag">tip</span>
1046 </h3> 1046 </h3>
1047 1047
1048 1048
1049 <form class="search" action="/log"> 1049 <form class="search" action="/log">
1050 1050