Split file with conflict markers

I am looking for a tool that splits a file with conflict markers into two separate files. Is there anything that does this already?

+6
source share
4 answers

xxdiff can do this:

xxdiff --unmerge myfile.txt 

it also works if conflict markers are the result of tripartite diff

 xxdiff --unmerge3 myfile.txt 
+2
source

The tool I work for ( ECMerge ) does this primarily to help you visually combine them visually. You can also save files left / right / ancestors with built-in Javascript engine. ECMerge reads markers for most of the "well-known" source code controls (CVS, git, mercurial, bazaar, SubVersion, Perforce, those that are compatible with previously cited and, of course, their own markers!).

+1
source

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

+1
source

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

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

0
source

Source: https://habr.com/ru/post/911778/


All Articles