简体   繁体   中英

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

How can you do a merge 'conflict report' in 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.

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. The hg parents command will, during a merge, list the two heads that are being merged.

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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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