如何按提交日期按行对`hg log`的输出进行排序? [英] How to make mercurial sort the output of `hg log` by commit date?

查看:88
本文介绍了如何按提交日期按行对`hg log`的输出进行排序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何按提交日期按商品顺序hg log的输出?

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.

推荐答案

您需要使用revset:

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)'

有关更多详细信息,请参见hg help -v revsets.

See hg help -v revsets for more details.

这篇关于如何按提交日期按行对`hg log`的输出进行排序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆