Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to view specific revisions in Mercurial log

📅 2014-May-05 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ head, mercurial, tag ⬩ 📚 Archive

I typically check the Mercurial history of a repository using the log or the graphical log -G method. I sometimes find it convenient to view only the tags or heads in the same log format. This is as if the log was filtered out to show only the tags or heads log entries.

This can be done by passing the resulting list of revisions from the tag or head functions to the log option:

$ hg log -r "tag()"
$ hg log -G -r "tag()"
$ hg log -r "head()"
$ hg log -G -r "head()"

Tried with: Mercurial 2.8.2 and Ubuntu 14.04

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