Search code examples
fileloggingmercurialrevision-history

Mercurial getting file-specific log/history information


Is there a way to get file specific information, similar to

hg log

I basically want committer, date/time, and the commit summary, but of just a single file.


Solution

  • You can filter the results of the hg log command by including a filename like so:

    hg log file.txt
    

    That will give you the standard log for every changeset where file.txt was changed. You can use

    hg log file.txt -l 10 -r "not merge()" 
    

    to limit it to only the last 10 as well as excluding merge changes using revsets