Mercurial 单行日志 [英] Mercurial log with one-liners

查看:15
本文介绍了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.

存在吗?还是我将它与我在 git 中看到的东西或其他东西混合在一起?

Does that exist? Or am I mixing this with something I have seen with git or something else?

推荐答案

 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}
"

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

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