mercurial/templates/map-cmdline.show
author Matt Harbison <matt_harbison@yahoo.com>
Fri, 24 Aug 2018 17:45:46 -0400
changeset 39297 37e56607cbb9
parent 38455 b45c353ebbc7
permissions -rw-r--r--
lfs: add a progress bar when searching for blobs to upload The search itself can take an extreme amount of time if there are a lot of revisions involved. I've got a local repo that took 6 minutes to push 1850 commits, and 60% of that time was spent here (there are ~70K files): \ 58.1% wrapper.py: extractpointers line 297: pointers = extractpointers(... | 57.7% wrapper.py: pointersfromctx line 352: for p in pointersfromctx(ct... | 57.4% wrapper.py: pointerfromctx line 397: p = pointerfromctx(ctx, f, ... \ 38.7% context.py: __contains__ line 368: if f not in ctx: | 38.7% util.py: __get__ line 82: return key in self._manifest | 38.7% context.py: _manifest line 1416: result = self.func(obj) | 38.7% manifest.py: read line 472: return self._manifestctx.re... \ 25.6% revlog.py: revision line 1562: text = rl.revision(self._node) \ 12.8% revlog.py: _chunks line 2217: bins = self._chunks(chain, ... | 12.0% revlog.py: decompressline 2112: ladd(decomp(buffer(data, ch... \ 7.8% revlog.py: checkhash line 2232: self.checkhash(text, node, ... | 7.8% revlog.py: hash line 2315: if node != self.hash(text, ... | 7.8% revlog.py: hash line 2242: return hash(text, p1, p2) \ 12.0% manifest.py: __init__ line 1565: self._data = manifestdict(t... \ 16.8% context.py: filenode line 378: if not _islfs(fctx.filelog(... | 15.7% util.py: __get__ line 706: return self._filelog | 14.8% context.py: _filelog line 1416: result = self.func(obj) | 14.8% localrepo.py: file line 629: return self._repo.file(self... | 14.8% filelog.py: __init__ line 1134: return filelog.filelog(self... | 14.5% revlog.py: __init__ line 24: censorable=True)
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)})")}'
38455
b45c353ebbc7 show: use filter() function to strip "tip" tag
Yuya Nishihara <yuya@tcha.org>
parents: 38300
diff changeset
    18
names_tags = '{if(filter_tags(names),
b45c353ebbc7 show: use filter() function to strip "tip" tag
Yuya Nishihara <yuya@tcha.org>
parents: 38300
diff changeset
    19
                  " ({label('log.{colorname}', join(filter_tags(names), ' '))})")}'
33062
0a507da7d8ea show: show all namespaces in "work" view
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33058
diff changeset
    20
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
    21
33058
11f768258dcc show: construct changeset templater during dispatch
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32059
diff changeset
    22
cset_shortdesc = '{label("log.description", desc|firstline)}'
38455
b45c353ebbc7 show: use filter() function to strip "tip" tag
Yuya Nishihara <yuya@tcha.org>
parents: 38300
diff changeset
    23
b45c353ebbc7 show: use filter() function to strip "tip" tag
Yuya Nishihara <yuya@tcha.org>
parents: 38300
diff changeset
    24
[templatealias]
b45c353ebbc7 show: use filter() function to strip "tip" tag
Yuya Nishihara <yuya@tcha.org>
parents: 38300
diff changeset
    25
filter_tags(names) = filter(names, ifeq(name, 'tip', '', name))