sapling/mercurial/templates
Anton Shestakov 281eec2f1e 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.
2017-11-15 23:55:09 +08:00
..
atom hgweb: reindent atom/changelogentry.tmpl 2016-06-29 22:48:32 +08:00
coal coal: use inheritance to derive from paper 2016-08-17 13:43:13 -05:00
gitweb hgweb: move changeset "tags" to a template in map file (gitweb and monoblue) 2017-11-15 19:36:16 +08:00
json hgweb: expose list of per-repo labels to templates 2016-06-30 18:59:53 -07:00
monoblue hgweb: move changeset "tags" to a template in map file (gitweb and monoblue) 2017-11-15 19:36:16 +08:00
paper hgweb: move changeset "tags" to a template in map file (paper and coal) 2017-11-15 23:55:09 +08:00
raw hgweb: replace 'shortlog' with 'changelog' in raw changelog template 2013-08-16 21:41:19 +04:00
rss hgweb: add missing slash to file log url in rss style 2016-12-08 23:59:36 +08:00
spartan hgweb: support Content Security Policy 2017-01-10 23:37:08 -08:00
static hgweb: fix jshint issues in mercurial.js 2017-11-11 14:14:38 +08:00
map-cmdline.bisect templater: load template fragments from [templates] section in map file 2017-10-14 17:51:01 +09:00
map-cmdline.changelog templater: load template fragments from [templates] section in map file 2017-10-14 17:51:01 +09:00
map-cmdline.compact templater: load template fragments from [templates] section in map file 2017-10-14 17:51:01 +09:00
map-cmdline.default obsfate: rename obsfate into obsolete in default mapfile 2017-10-19 12:33:53 +02:00
map-cmdline.phases templater: load template fragments from [templates] section in map file 2017-10-14 17:51:01 +09:00
map-cmdline.show show: use labelcset() template alias for work (and stack) views 2017-10-17 20:25:43 +02:00
map-cmdline.status templater: load template fragments from [templates] section in map file 2017-10-14 17:51:01 +09:00
map-cmdline.xml templater: load template fragments from [templates] section in map file 2017-10-14 17:51:01 +09:00