简体   繁体   English

如何在Mercurial中进行合并“冲突报告”?

[英]How can you do a merge 'conflict report' in Mercurial?

How can you do a merge 'conflict report' in Mercurial? 如何在Mercurial中进行合并“冲突报告”?

Given two conflicting revisions of a file in two heads, how can you output a report showing the parent and the two sets of revisions in each head? 给定两个头部中文件的两个相互冲突的修订版,您如何输出显示父级和每个头部中的两组修订版的报告?

Basically, I would like to send a 'report' of the conficts to the developer who owns the file so he can comment on how best to do the merge. 基本上,我想将冲突的“报告”发送给拥有该文件的开发人员,以便他可以评论如何最好地进行合并。

We use BeyondCompare as our merge tool - couldn't see an option to do this in BeyondCompare. 我们将BeyondCompare用作合并工具-在BeyondCompare中看不到执行此操作的选项。

Revisions span all files, so whatever report you're envisioning it won't have revision info per-file. 修订涵盖所有文件,因此,无论您要设想的报告是什么,每个文件都不会包含修订信息。

If you've begun a merge with hg merge and have gotten merge conflicts you can do hg resolve --list to get a list of all the files that conflict. 如果您已经开始使用hg merge并且遇到合并冲突,则可以执行hg resolve --list以获得所有冲突文件的列表。 The hg parents command will, during a merge, list the two heads that are being merged. 在合并过程中, hg parents命令将列出正在合并的两个磁头。

You could use something like hg archive -I file1 -I file2 --revision head1 head1.zip to make an archive file with the files file1 and file2 as they stood at revision head1. 您可以使用类似hg archive -I file1 -I file2 --revision head1 head1.zip的文件来制作一个归档文件,其中文件file1和file2位于修订版head1处。 If you do that for all the files in conflict and for each head you've got something you can send. 如果对所有冲突的文件以及每个文件头都执行此操作,则可以发送一些内容。

Ideally you just tell the dev to pull, merge, and push the merge -- this is easily handled within Mercurial and clumsily handled outside of it. 理想情况下,您只需要告诉开发人员进行合并,合并和推送即可-在Mercurial中很容易处理,而在外部则笨拙地处理。

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

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