# HG changeset patch # User Anton Shestakov # Date 1510745776 -28800 # Node ID e9a8a941950ac90256ab1a90a57618656c15ae81 # Parent f9b23fa35cb332e69e926c6d4ab8395cb969e165 hgweb: move changeset "tags" to a template in map file (gitweb and monoblue) Less duplication and it's also easier to add extra "tags" everywhere at once. These aren't tags as defined `hg help glossary` (hence the quotes), they are simply called that. They include branch name (in different styles if changeset is a head of that branch or not), (actual) tags and bookmarks. Good candidates to add to this list would be changeset phase and obsoletion status. diff -r f9b23fa35cb3 -r e9a8a941950a mercurial/templates/gitweb/changelogentry.tmpl --- a/mercurial/templates/gitweb/changelogentry.tmpl Wed Nov 15 16:06:00 2017 +0800 +++ b/mercurial/templates/gitweb/changelogentry.tmpl Wed Nov 15 19:36:16 2017 +0800 @@ -2,7 +2,7 @@ {date|rfc822date} {desc|strip|firstline|escape|nonempty} - {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag} + {alltags}
diff -r f9b23fa35cb3 -r e9a8a941950a mercurial/templates/gitweb/changeset.tmpl --- a/mercurial/templates/gitweb/changeset.tmpl Wed Nov 15 16:06:00 2017 +0800 +++ b/mercurial/templates/gitweb/changeset.tmpl Wed Nov 15 19:36:16 2017 +0800 @@ -32,7 +32,7 @@
{desc|strip|escape|firstline|nonempty} - {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag} + {alltags}
diff -r f9b23fa35cb3 -r e9a8a941950a mercurial/templates/gitweb/manifest.tmpl --- a/mercurial/templates/gitweb/manifest.tmpl Wed Nov 15 16:06:00 2017 +0800 +++ b/mercurial/templates/gitweb/manifest.tmpl Wed Nov 15 19:36:16 2017 +0800 @@ -28,7 +28,7 @@ {searchform}
-
{path|escape} {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}
+
{path|escape} {alltags}
diff -r f9b23fa35cb3 -r e9a8a941950a mercurial/templates/gitweb/map --- a/mercurial/templates/gitweb/map Wed Nov 15 16:06:00 2017 +0800 +++ b/mercurial/templates/gitweb/map Wed Nov 15 19:36:16 2017 +0800 @@ -266,6 +266,7 @@ branchtag = '{name|escape} ' inbranchtag = '{name|escape} ' bookmarktag = '{name|escape} ' +alltags = '{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}' shortlogentry = ' @@ -273,7 +274,7 @@
drwxr-xr-x
{date|rfc822date} {desc|strip|firstline|escape|nonempty} - {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag} + {alltags} {desc|strip|firstline|escape|nonempty} - {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag} + {alltags}