Questions tagged [diff3]

diff3 is a Unix utility to compare three files and show any differences among them.

When two people have made changes to copies of the same file, diff3 can produce a merged output that contains both sets of changes together with warnings about conflicts.

diff3 can:

  1. merge three or more sets of changes to a file by merging two change sets at a time.

  2. incorporate changes from two modified versions into a common preceding version.

diff3 has several methods to handle overlaps and conflicts. It can omit overlaps or conflicts, or select only overlaps, or mark conflicts with special '<<<<<<<' and '>>>>>>>' lines.

diff3 can output the merge results as an ed script that can be applied to the first file to yield the merged output. However, directly generating the merged output bypasses some problems with ed.

Read more

25 questions
1
vote
1 answer

version control for binary files

I'm in the process of writing a program that will use its own binary format for storing data. I would like to make possible to have some form of version control, at the very least two different people should be able to make changes on a file and…
user2759511
  • 640
  • 7
  • 16
1
vote
1 answer

how to get chunks in diff3 algorithm implementation

I'm trying to implement diff3 algorithm and currently stuck at chunks creation stage. I already know how to get LCS between original file and "other" file and LCS between original file and "my" file. Which steps need to do to get chunks?
Bibliarij
  • 43
  • 8
1
vote
0 answers

How to use one script for diff and diff3 in Subversion?

I have a Perl script that determines what external diff to use depending on the file's content. I would like to use it determine external diff3 also. Which is the best method to know how my script is being called? I was planning to catch the last…
lamcro
  • 6,069
  • 18
  • 57
  • 70
1
vote
1 answer

In Git is there a way (or tool) to merge by comparing changes, not files?

In Git the standard merge algorithms let you compare the final state of the files in the two branches, which means I have to remember or guess what the changes leading up to that point in both branches were. Setting merge conflictstyle=diff3 in…
Steadicat
  • 309
  • 2
  • 7
1
vote
1 answer

hg automatic merges with diff3

Consider a Hg project with two central branches/clones - e.g. DEV and PRD. When someone pushes a hotfix to PRD, an automated script on the central server goes to DEV and pulls the new changes. It then tries to merge the hotfix into DEV. The problem…
YMA
  • 259
  • 3
  • 14
0
votes
1 answer

Using diff3 on a mercurial merge via command line

I'm sitting at a screen split in 3 in Putty showing my files. I can't figure out what I need to Google in order to find documentation on how to navigate the command line UI for KDIFF3. I'm trying to figure out how to go line by line or conflict by…
Ben
  • 60,438
  • 111
  • 314
  • 488
0
votes
0 answers

Which Git mergetools can I use with a custom merge driver?

I have written a custom merge driver for JSON which outputs diff3 format. All good visual mergetools I have tried insist on re-merging the file before showing the GUI. Are there any tools which can use the conflictfile with <<<<<<< ||||||| =======…
Vulume
  • 15
  • 5
0
votes
1 answer

Maintain wiki translation

I'm trying to maintain several translations of a project on a wiki. The wiki doesn't support translation, but I can import/export using text files. So for simplicity's sake, let's consider every file in the documentation is a simple text file. It…
vincent-lg
  • 539
  • 7
  • 15
0
votes
1 answer

Using diff3 where filenames contain a dash (-)

I'm trying to use diff3 in this way diff3 options... mine older yours My problem is that I probably can't use it, since all my 3 files contain a "dash" within. The manual mentions: At most one of these three file names may be `-', which tells…
user1762109
0
votes
1 answer

VCS theory - merge: recursive revrision merge or 3 revision merge?

I have a theoretical question about possible VCS merging. I know that many VCS use 3 revision merge, which is common ancestor, "mine" and "your" revision. I know how they works. I've thought about another alternative, recursive revision merge,…
Tal
  • 347
  • 2
  • 16
1
2