带一行的Mercurial日志 [英] Mercurial log with one-liners

查看:97
本文介绍了带一行的Mercurial日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

常规的 hg log 命令为每个变更集提供至少4行的输出。例如

The regular hg log command gives output with at least 4 lines per changeset. For example

changeset:   238:03a214f2a1cf
user:        My Name <my.name@example.com>
date:        Thu Aug 26 09:49:32 2010 +0200
summary:     Added tag v1.1 for changeset f22fd3974361

我的意思是记住,有一个命令以更紧凑的方式打印一个日志,每个变更集只有一行。一种格式,你基本上可以坚持在一个changelog.txt文件,它会看起来不错。

I mean to remember that there was a command to print a log in a more compact way what just had one line per changeset. A format that you could basically stick in a changelog.txt file and it would look nice.

这是否存在?

推荐答案

 hg log --style compact

您还可以使用模板以不同格式显示注销

You can also use templates to display log out in different formats

hg help templates

在你的情况下,如果你想只显示节点id做这样的事情

In your case if you want to display only node ids do something like this

hg log --template "{node}\n"

这篇关于带一行的Mercurial日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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