简体   繁体   English

Mercurial - hg日志只有两个变更集?

[英]Mercurial - hg log for just two changesets?

命令hg log -v -r 2:5可用于查看变更集2/3/4/5的详细信息 - 是否有类似的方法可以查看JUST变更集2和5的变更集详细信息?

Use separate -r specifiers: 使用单独的-r说明符:

hg log -v -r 2 -r 5

It will give you the log entries in the same order you specify rev numbers. 它将以您指定转数的相同顺序为您提供日志条目。

Here's a test which demonstrates this: 这是一个测试,证明了这一点:

mkdir hgTest; cd hgTest; hg init; echo "0" > 0.txt; hg addremove; hg commit -m "Added file 0.txt"; echo "1" > 1.txt; hg addremove; hg commit -m "Added file 1.txt"; echo "2" > 2.txt; hg addremove; hg commit -m "Added file 2.txt"

Now run hg log -v -r 0 -r 2 in the hgTest directory, and you'll see: 现在在hgTest目录中运行hg log -v -r 0 -r 2 ,你会看到:

changeset:   0:22deafd4b5da
user:        aUser
date:        Fri Mar 25 17:37:01 2011 +0000
files:       0.txt
description:
Added file 0.txt


changeset:   2:39fedf6f9f56
tag:         tip
user:        aUser
date:        Fri Mar 25 17:37:01 2011 +0000
files:       2.txt
description:
Added file 2.txt

Notice there's no mention of the file 1.txt which was added in revision 1. 请注意,没有提到在修订版1中添加的文件1.txt

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

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