How to make mercurial sort the output of `hg log` by commit date?

别说谁变了你拦得住时间么 提交于 2019-12-11 17:18:16

问题


How can I make mercurial order the output of hg log by commit date?

The output seems to be ordered by the date I pull the commits into my repository instead of when they were committed.


回答1:


You need to use a revset:

$ hg log -r 'sort(all(), date)'

If you want to see the most recent commits first, do:

$ hg log -r 'sort(all(), -date)'

See hg help -v revsets for more details.



来源:https://stackoverflow.com/questions/47269015/how-to-make-mercurial-sort-the-output-of-hg-log-by-commit-date

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!