changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > infra > home / templates/map-cmdline.show

changeset 53: d25f982fb8a6
author: Richard Westhaver <ellis@rwest.io>
date: Sat, 20 Jul 2024 22:31:54 -0400
permissions: -rw-r--r--
description: init vc
1 # TODO there are a few deficiencies in this file:
2 # * The "namespace" of the labels needs to be worked out. We currently
3 # piggyback on existing values so color works.
4 
5 %include map-cmdline.default
6 
7 [templates]
8 showbookmarks = '{if(active, "*", " ")} {pad(bookmark, longestbookmarklen + 4)}{shortest(node, nodelen)}\n'
9 
10 showwork = '{cset_shortnode}{namespaces % cset_namespace} {cset_shortdesc}'
11 showstack = '{showwork}'
12 
13 cset_shortnode = '{labelcset(shortest(node, nodelen))}'
14 
15 # Treat branch and tags specially so we don't display "default" or "tip"
16 cset_namespace = '{ifeq(namespace, "branches", names_branches, ifeq(namespace, "tags", names_tags, names_others))}'
17 names_branches = '{ifeq(branch, "default", "", " ({label('log.{colorname}', branch)})")}'
18 names_tags = '{if(filter_tags(names),
19  " ({label('log.{colorname}', join(filter_tags(names), ' '))})")}'
20 names_others = '{if(names, " ({label('log.{colorname}', join(names, ' '))})")}'
21 
22 cset_shortdesc = '{label("log.description", desc|firstline)}'
23 
24 [templatealias]
25 filter_tags(names) = filter(names, ifeq(name, 'tip', '', name))