Show More
@@ -920,8 +920,8 class changeset_printer(object): | |||
|
920 | 920 | # should be the same |
|
921 | 921 | for name in ns.names(self.repo, changenode): |
|
922 | 922 | # i18n: column positioning for "hg log" |
|
923 |
|
|
|
924 |
self.ui.write("%s" % |
|
|
923 | name = _(("%s:" % ns.logname).ljust(13) + "%s\n") % name | |
|
924 | self.ui.write("%s" % name, label='log.%s' % ns.colorname) | |
|
925 | 925 | if self.ui.debugflag: |
|
926 | 926 | # i18n: column positioning for "hg log" |
|
927 | 927 | self.ui.write(_("phase: %s\n") % _(ctx.phasestr()), |
@@ -1571,8 +1571,9 Check that adding an arbitrary name show | |||
|
1571 | 1571 | > namemap = lambda r, name: foo.get(name) |
|
1572 | 1572 | > nodemap = lambda r, node: [name for name, n in foo.iteritems() |
|
1573 | 1573 | > if n == node] |
|
1574 |
> ns = namespace("bars", templatename="bar", l |
|
|
1575 | > namemap=namemap, nodemap=nodemap) | |
|
1574 | > ns = namespace("bars", templatename="bar", logname="barlog", | |
|
1575 | > colorname="barcolor", listnames=names, namemap=namemap, | |
|
1576 | > nodemap=nodemap) | |
|
1576 | 1577 | > |
|
1577 | 1578 | > repo.names.addnamespace(ns) |
|
1578 | 1579 | > EOF |
@@ -1580,11 +1581,24 Check that adding an arbitrary name show | |||
|
1580 | 1581 | $ hg --config extensions.names=../names.py log -r 0 |
|
1581 | 1582 | changeset: 0:65624cd9070a |
|
1582 | 1583 | tag: tip |
|
1583 |
bar: |
|
|
1584 | barlog: foo | |
|
1584 | 1585 | user: test |
|
1585 | 1586 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1586 | 1587 | summary: a bunch of weird directories |
|
1587 | 1588 | |
|
1589 | $ hg --config extensions.names=../names.py \ | |
|
1590 | > --config extensions.color= --config color.log.barcolor=red \ | |
|
1591 | > --color=always log -r 0 | |
|
1592 | \x1b[0;33mchangeset: 0:65624cd9070a\x1b[0m (esc) | |
|
1593 | tag: tip | |
|
1594 | \x1b[0;31mbarlog: foo\x1b[0m (esc) | |
|
1595 | user: test | |
|
1596 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
1597 | summary: a bunch of weird directories | |
|
1598 | ||
|
1599 | $ hg --config extensions.names=../names.py log -r 0 --template '{bars}\n' | |
|
1600 | foo | |
|
1601 | ||
|
1588 | 1602 |
$ |
|
1589 | 1603 | |
|
1590 | 1604 |
hg |
General Comments 0
You need to be logged in to leave comments.
Login now