Log templates

Dennis Brakhane brakhane at googlemail.com
Sat Dec 10 16:29:50 CST 2011


On Sat, Dec 10, 2011 at 10:48 PM, Scott Palmer <swpalmer at gmail.com> wrote:
> The "user" filter doesn't seem to to the right thing:
> [...]
> Is that right?

Well, the user filter boils down to calling util.shortuser ("Return a
short representation
of a user name or email address."), which will

1. Strip everything after and including the first @
2. From this, strip everything before (and including) the first <
3. Strip everything after the first space
4. Strip everything after the first dot.

IMHO, "shortuser" would have been a better name, as it is clearly intended to
shorten a author name like "Foo Bar <foo.bar at example.org>" to "Foo" and
"foo.bar at example.org" to "foo".

So the filter description "Returns the user portion of an email
address" is clearly wrong.
Feel free to file a bug report.

And no, while there is a filter to return the domain portion of an
email address, there is no
such filter to return the full user part of an email address, so
AFAICT you cannot do what you want
with the built-in filters. You might want to add (a seperate) wishlist
bug report for this as well.
(Or even better, provide a patch)


More information about the Mercurial mailing list