3 ms·
In Mercurial: hg log --rev "date(yesterday)" --template "{shortest(node, 6)} - {desc|firstline} ({date|age}) <{author|person}>\n" This shows off both revsets
by jordigh 10y ago
In Mercurial:
hg log --rev "date(yesterday)" --template "{shortest(node, 6)} - {desc|firstline} ({date|age}) <{author|person}>\n"
This shows off both revsets (the language parsed by the --rev option) and templates (the language parsed by the --template option). The revset can be modified into "date(yesterday) and user(jordi)" to limit it to only a particular user.
As it stands, this revset+template combination won't colourise the output. For that we need to add labels to the template:
hg log -r "date(yesterday)" -T "{label('changeset.{phase}', shortest(node, 6))} - {label('log.summary', desc|firstline)} ({label('log.date', date|age)}) <{label('log.user', author|person)}>\n"
At this length, it starts to look unwieldy, but it should go into your hgrc anyway, where you can easily split it into multiple lines without having to worry about shell quoting. Here are more details about the general method:
http://jordi.inversethought.com/blog/customising-mercurial-like-a-pro/ http://jordi.inversethought.com/blog/customising-mercurial-l...