Support conflict resolution using diff/diff3 format files

Support for our DiffMerge utility.

Moderator: SourceGear

Posts: 1
Joined: Mon Nov 26, 2018 5:28 am
PostPosted: Mon Nov 26, 2018 5:35 am
Does DiffMerge have the ability to
1) Open a text file that contains conflict markers in the diff or diff3 format
2) Allow the user to navigate through the conflicts and resolve the conflicts in the DiffMerge conflict resolver UI

In effect, DiffMerge should not to re-calculate the file differences itself, but support the conflict resolution process based only on the input file containing the diff conflict markers.

For example, a very simple 2 way diff format input file with conflicts would be

<<<<<<< A
line from A
line from B
>>>>>>> B

Many Thanks,

Posts: 25
Joined: Tue Oct 28, 2008 1:20 pm
Location: SourceGear
PostPosted: Mon Nov 26, 2018 4:45 pm
DiffMerge does not have the capability to resolve conflicts based on conflict markers. It doesn't even support editing a single file. It can produce an output file in the Unified Diff Format which then be edited by You in a text editor.

For example, take two files:

Code: Select all
Left.txt            Right.txt       
---------       ---------       
Line one.           Line one.       
Line two.           Line two.       
Line only Left.     Line three.     
Line three.         Line four.     
Line four.          Line only Right.
Line five.          Line five.     
Line conflict.      Conflict line.
Line six.           Line six.       

DiffMerge can create a Unified Diff formatted output file by using the following command:

\path\to\sgdm.exe -u Left.txt Right.txt -d=Result.txt

Code: Select all
--- D:\Cx\Left.txt   2018-11-26 14:31:21.239000000 -0600
+++ D:\Cx\Right.txt   2018-11-26 14:31:04.402000000 -0600
@@ -1,7 +1,7 @@
 Line one.
 Line two.
-Line only Left.
 Line three.
 Line four.
+Line only Right.
 Line five.
 Line six.

The user could then use a text editor to navigate through the result, manually resolving the conflicts.

But that may be the opposite of what you are looking for. If so, then I would have to say that DiffMerge does not have the capability you are looking for.

See DiffMerge Help: 10. Command Line Arguments | Diffing Files to a File
Joe Ream
SourceGear Technical Support

Return to Support (DiffMerge)

Who is online

Users browsing this forum: No registered users and 2 guests