[PATCH] namespaces: add logname member to namespace object

Sean Farley sean.michael.farley at gmail.com
Fri Jan 16 12:43:56 CST 2015


Augie Fackler writes:

> On Wed, Jan 14, 2015 at 04:49:25PM -0800, Sean Farley wrote:
>> # HG changeset patch
>> # User Sean Farley <sean.michael.farley at gmail.com>
>> # Date 1421281900 28800
>> #      Wed Jan 14 16:31:40 2015 -0800
>> # Node ID 0508ab9d59758c22fa968d3bc2a184c51dd2c7ff
>> # Parent  f6070d3a9cb89a50ae3112f7c3d22f4ccc5c4db7
>> namespaces: add logname member to namespace object
>>
>> Previously, there was no way to change the name used for 'hg log' output. This
>> was inconvenient for extensions that want a template name longer than 12
>> characters (e.g. remotebookmarks) but a different name for 'hg log'.
>
> If/when we se a new version of htis, could you give an example of what
> a regular vs logname might look like? I wrote remotebranches and I
> can't come up with an example offhand.

It's already been queued but the example is due to 'remotebookmarks'
being one or two characters too long:

$ hg log -r .
changeset:   3:78f83396d79e
bookmark:    babar
remotebookmark:beta/babar
remotebranch:beta/default
parent:      1:7c3bad9141dc
user:        test
date:        Thu Jan 01 00:00:00 1970 +0000
summary:     add d

The templatename (singular case of the plural name 'remotebookmarks')
was used in the log output. We still want to use the name
'remotebookmark' for clarity:

$ hg log -r . -T '{remotebookmarks % "REMOTE: {remotebookmark}\n"}'
REMOTE: beta/babar

Changing the template name just to affect the log output seemed too
constraining. With this patch series, we keep the same template name
(remotebookmark) and change only the log output to, let's say for
example, 'bookmark'. If we do that there is a name clash with using the
same color for 'bookmark' as we do for 'remotebookmark'. Hence, we allow
setting both the log name and the color name.


More information about the Mercurial-devel mailing list