Mercurial log with one-liners

Viewed 13055

The regular hg log command gives output with at least 4 lines per changeset. For example

changeset:   238:03a214f2a1cf
user:        My Name <my.name@example.com>
date:        Thu Aug 26 09:49:32 2010 +0200
summary:     Added tag v1.1 for changeset f22fd3974361

I mean to remember that there was a command to print a log in a more compact way what just had one line per changeset. A format that you could basically stick in a changelog.txt file and it would look nice.

Does that exist? Or am I mixing this with something I have seen with git or something else?

4 Answers

Just in case anyone wants something similar to git log --oneline:

hg log --template '{rev} {tags} {desc|strip|firstline}\n' -l 5
2737 tip Lint: trailing-whitespace
2736  Hack: temporary auto-subscription on login
2735  Fix: Encoding wasn't passed in memory metrics

Replace {rev} with {node|short} if you want hashes (but in Mercurial revision numbers are traditionally used).

Related