mercurial/templates/map-cmdline.show
author Wojciech Lis <wlis@fb.com>
Thu, 30 Nov 2017 16:01:53 -0800
changeset 35436 86b8cc1f244e
parent 34877 eb24f1d1b50b
child 38300 a9de1d28681c
permissions -rw-r--r--
worker: make windows workers daemons The windows workers weren't daemons and were not correctly killed when ctrl-c'd from the terminal. Withi this change when the main thread is killed, all daemons get killed as well. I also reduced the time we give to workers to cleanup nicely to not have people ctrl-c'ing when they get inpatient. The output when threads clened up nicely: PS C:\<dir>> hg.exe sparse --disable-profile SparseProfiles/<profile>.sparse interrupted! The output when threads don't clenup in 1 sec: PS C:\<dir> hg.exe sparse --enable-profile SparseProfiles/<profile>.sparse failed to kill worker threads while handling an exception interrupted! Exception in thread Thread-4 (most likely raised during interpreter shutdown): PS C:\<dir>> Test Plan: Run hg command on windows (pull/update/sparse). Ctrl-C'd sparse --enable-profile command that was using threads and observed in proces explorer that all threads got killed. ran tests on CentOS Differential Revision: https://phab.mercurial-scm.org/D1564
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
32059
0ea1d9a750da show: add basic labels to work template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
     1
# TODO there are a few deficiencies in this file:
0ea1d9a750da show: add basic labels to work template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
     2
# * The "namespace" of the labels needs to be worked out. We currently
0ea1d9a750da show: add basic labels to work template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
     3
#   piggyback on existing values so color works.
34877
eb24f1d1b50b show: use labelcset() template alias for work (and stack) views
Denis Laxalde <denis@laxalde.org>
parents: 34714
diff changeset
     4
eb24f1d1b50b show: use labelcset() template alias for work (and stack) views
Denis Laxalde <denis@laxalde.org>
parents: 34714
diff changeset
     5
%include map-cmdline.default
34714
f4aeb952ab77 templater: load template fragments from [templates] section in map file
Yuya Nishihara <yuya@tcha.org>
parents: 34202
diff changeset
     6
f4aeb952ab77 templater: load template fragments from [templates] section in map file
Yuya Nishihara <yuya@tcha.org>
parents: 34202
diff changeset
     7
[templates]
34202
4441c1113eb2 show: pass the minimum length for nodes as a template keyword
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33199
diff changeset
     8
showbookmarks = '{if(active, "*", " ")} {pad(bookmark, longestbookmarklen + 4)}{shortest(node, nodelen)}\n'
33058
11f768258dcc show: construct changeset templater during dispatch
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32059
diff changeset
     9
33062
0a507da7d8ea show: show all namespaces in "work" view
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33058
diff changeset
    10
showwork = '{cset_shortnode}{namespaces % cset_namespace} {cset_shortdesc}'
33199
c5a07a3abe7d show: implement "stack" view
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33062
diff changeset
    11
showstack = '{showwork}'
33058
11f768258dcc show: construct changeset templater during dispatch
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32059
diff changeset
    12
34877
eb24f1d1b50b show: use labelcset() template alias for work (and stack) views
Denis Laxalde <denis@laxalde.org>
parents: 34714
diff changeset
    13
cset_shortnode = '{labelcset(shortest(node, nodelen))}'
33062
0a507da7d8ea show: show all namespaces in "work" view
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33058
diff changeset
    14
0a507da7d8ea show: show all namespaces in "work" view
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33058
diff changeset
    15
# Treat branch and tags specially so we don't display "default" or "tip"
0a507da7d8ea show: show all namespaces in "work" view
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33058
diff changeset
    16
cset_namespace = '{ifeq(namespace, "branches", names_branches, ifeq(namespace, "tags", names_tags, names_others))}'
0a507da7d8ea show: show all namespaces in "work" view
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33058
diff changeset
    17
names_branches = '{ifeq(branch, "default", "", " ({label('log.{colorname}', branch)})")}'
0a507da7d8ea show: show all namespaces in "work" view
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33058
diff changeset
    18
names_tags = '{if(names % "{ifeq(name, 'tip', '', name)}", " ({label('log.{colorname}', join(names % "{ifeq(name, 'tip', '', name)}", ' '))})")}'
0a507da7d8ea show: show all namespaces in "work" view
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33058
diff changeset
    19
names_others = '{if(names, " ({label('log.{colorname}', join(names, ' '))})")}'
0a507da7d8ea show: show all namespaces in "work" view
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33058
diff changeset
    20
33058
11f768258dcc show: construct changeset templater during dispatch
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32059
diff changeset
    21
cset_shortdesc = '{label("log.description", desc|firstline)}'