查看对Mercurial中的特定文件进行更改的所有版本号 [英] View all revision numbers that made changes to a particular file in Mercurial
本文介绍了查看对Mercurial中的特定文件进行更改的所有版本号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望看到对特定文件进行任何更改的所有版本号。
输出应该如下所示:
20
27
59
如果不可能,Git有可能吗?
感谢您。
使用 template system 。要获得文件 README
的版本号,您可以这样做: hg log --template'{rev} \\\
'README
如果您需要更改集哈希相反,它是:
hg log --template'{node | short} \\\
'README
请参阅 hg help templating
获取更多帮助。您可以在在线找到相同的帮助(搜索模板使用情况)。
I would like to see all revision numbers that made any changes to a particular file. The output should look like follows:
20
27
59
If it is not possible, is it possible with Git?
Thank you.
解决方案
Use the template system in Mercurial. To get the revision number for the file README
you'll do:
hg log --template '{rev}\n' README
If you need the changeset hashes instead, then it's:
hg log --template '{node|short}\n' README
See hg help templating
for more help. You can find the same help online (search for "Template Usage").
这篇关于查看对Mercurial中的特定文件进行更改的所有版本号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文