简体   繁体   English

汞日志-如何以相反的顺序显示修订的日期范围?

[英]hg log - how to display a date range of revisions in reverse order?

In bash, I am using a date range to restrict the number of revisions showed as follows: 在bash中,我使用日期范围来限制显示的修订版本,如下所示:

hg log -d "yyyy-mm-dd to yyyy-mm-dd"

I would like to output to display the most recent revision at the bottom. 我想输出以在底部显示最新修订。 Currently, it starts with the most recent at the top & works it's way down. 目前,它是从最新的顶部开始的,并且一直在下降。

Thanks in advance! 提前致谢!


I am trying to implement the hg log -r "(date("$startdate to $enddate"))" solution into a bash script as per below: 我正在尝试将hg log -r "(date("$startdate to $enddate"))"解决方案实施为bash脚本,如下所示:

read -p "Specify start of date range(yyyy-mm-dd): " startdate
read -p "Specify end of date range(yyyy-mm-dd): " enddate
hg log -r '(date("$startdate to $enddate"))'

However, the variables are no longer recognised. 但是,变量不再被识别。 I have tried using double quotes & also quoting the variables themselves but no avail. 我试过使用双引号,也引用了变量本身,但无济于事。 Any help is appreciated! 任何帮助表示赞赏!

您可以改用revsets

hg log -r 'reverse(date("yyyy-mm-dd to yyyy-mm-dd"))'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM