Split a file with conflict markers

此生再无相见时 提交于 2019-12-05 08:18:41

xxdiff can do that:

xxdiff --unmerge myfile.txt

it also works if the conflict markers result from a 3-way diff

xxdiff --unmerge3 myfile.txt

The tool I work for (ECMerge) does that, primarily with the target of helping you to merge them visually of course. You could as well save the left/right/ancestor files with the built-in Javascript engine. ECMerge reads markers for most 'well-known' source code controls (CVS, git, mercurial, bazaar, SubVersion, Perforce, those compatible with the previously cited and of course its own markers!).

Winmerge does that, they call it "Resolve conflict files". It only works on Windows though.

As requested, my own solution to my question was to create the following Perl script.

http://github.com/quincy/Unmerge-Conflicts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!