6

Is it possible to copy only one change or many changes one by one in kdiff? There are such options in WinMerge which allow to copy chnge from one file to second file without merging.

I need to copy few changes from one file to another and want to do it manually.

Luke Girvin
  • 13,221
  • 9
  • 64
  • 84
Krzysiek Grzembski
  • 960
  • 10
  • 20

2 Answers2

2

first of all, say we have a left.txt and a right.txt, you need to make sure that right.txt is placed on the right side of kdiff.

so it will be like this:

       left.txt       right.txt
1        a              b
2        b              b
3        c              b

say you only want the 3rd line in left.txt to be merged in right.txt

FIRST, align and split/join the diff to satisfy your needs.

You can find it in the help document, search:

Manually Aligning Lines and Manually Joining and Splitting Diff Sections

Here comes the process

1, click 'merge' on the toolbar

2, use ctrl+shift+2 to apply all conflicts with right.txt(which is also B here)

the merge file will become:

1    b
2    b
3    b

3, select line 3, press ctrl+1 that will select changes from left.txt. And the output file wlll be:

1    b
2    b
3    c

And I think that is what you want.

shengy
  • 9,461
  • 4
  • 37
  • 61
  • I mark this as answered but i knew about this. I rather was searching for interface like in WinMerge. Or something like "Copy selected line to left window" – Krzysiek Grzembski Sep 07 '12 at 11:39
  • I think that is not allowed in kdiff3, because the compare vision is read-only. You can only change things in a merge view. – shengy Sep 08 '12 at 15:08
0

Use DiffMerge instead. Its free and much better than kdiff

http://www.sourcegear.com/diffmerge/

Crusader
  • 1,182
  • 11
  • 22