hg log - How to get the last 5 log entries?

后端 未结 2 478
夕颜
夕颜 2020-12-24 10:00

I have a Mercurial project that has hundreds of commits.

When I want to look at the most recent entries I type

hg log

and then wait

相关标签:
2条回答
  • 2020-12-24 10:38

    Use the limit parameter: hg log --limit 5

    0 讨论(0)
  • 2020-12-24 10:54

    In completion of the Michael Markert response you can use the shortversion

    hg log -l 10
    

    In addition if you want you can define via the option -b that you want only last commit from the current branch.

    You can also do

    hg log -l 10 -b [your branch]
    

    for check 10 last commit from the branch you want

    Of course you can go further with -d like this :

    hg log -l 1 -d "feb 2015 to apr 2015"
    

    This will give you last 10 commits within this date range (3 char for each months)

    And goes on..

    Full example and option are available in this link : Here

    0 讨论(0)
提交回复
热议问题