如何查看两个汞库之间不同的所有文件的列表? [英] How can I see a list of all files that are different between two Hg repositories?
问题描述
我有一个包含很多工作代码的存储库.我团队中的另一个开发人员暂时没有进行任何更新,然后提交了大约5个变更集.因此,现在我们有两个负责人,彼此相隔将近两个星期.提示不起作用,但我的changeset起作用.
I've got a repository that has a lot of working code. Another developer on my team went without any updates for a while and then committed about 5 changesets. So, now we have two heads that are nearly two weeks apart. The tip doesn't work, but my changeset does.
我想查看两个存储库之间的区别,而不必合并它们(因为我不确定是否要这样做).
I want to see what the differences are between the two repositories without having to merge them (because I'm not sure I want to do that).
推荐答案
如果您的存储库中有两个目录(请记住,您实际上不必与其他开发人员的目录一起更新工作副本),则位于根目录中工作副本:
If you have both heads in your repository (remember, you don't actually have to update your working copy with the other developer's head), from the root directory of your working copy:
hg diff -r <your head changeset id> -r <other dev changeset id> .
应该工作.当然,您可以使用hg heads获取变更集id,听起来其中之一可能是"tip".
should work. Of course, you can use hg heads to get the changeset ids, one of which it sounds like could be "tip".
如果以上方法返回的信息过多,而您只想知道更改了哪些文件,请尝试通过grep进行管道传输:
If the above returns too much information, and you just wish to know what files changed, try piping through grep:
hg diff -r <your head id> -r <other dev id> | grep -E '^\+{3} b/'
可能会解决问题.
这篇关于如何查看两个汞库之间不同的所有文件的列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!