Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Show compact revision history in Mercurial

📅 2012-Dec-07 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ history, mercurial, revision ⬩ 📚 Archive

The command to view the revision history in Mercurial is hg log. This shows a lot of information: the revision number (local to the repository), the changeset ID, user, date and summary, each on a different line. This style of revision history occupies too many lines of the display.

A more compact revision history can be viewed by using:

hg log --style=compact

This shows the summary on one line and the rest of the information on a single line above it.

To view the revision history in the GNU changelog style use:

hg log --style=changelog

To apply one of these revision history styles by default on hg log, add this to your Mercurial configuration file:

style = compact

If you have applied a different revision history style on hg log, but want to view it in default style use:

hg log --style=default

Tried with: Mercurial 2.3.2

© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘📧