Apply patches

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
linobarreca
Posts: 21
Joined: 2003-10-11 08:59

Apply patches

Post by linobarreca » 2004-01-05 11:43

Hi everybody.

I did some changes in the dc++ code and I proposed to include them in the final DC++.
Theese changes were rejected by Arne.

Now I'm searching a way to automatically patch the source code whenwver a new dc++ version comes out.

Is there a tool that can do this automatically?
I need something that compares all files in two folders (original and modified) and produces a patch script that can be "played" almost automatically (excluding when the new files were modded in the same position where the script should patch).

Do you know if such a tool exists?

Please note that this should work for source files and so it should patch in text-mode (search a block and replace with another)

Thanks.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-01-05 12:29

The "patch" command line tool does the trick, if you have a unified diff (made with diff -u) of the changes.

You could also use WinCVS (or a similar tool) and update your client in-place, relying on its conflict resolution ability (since if it cannot do it automatically, it will ask for manual intervention.)

Generally, the class of graphical comparison programs are called "Merge tools" - WinMerge is one. I bought a nice high-end merge tool because of the time it ends up saving me (even though this is just a hobby of mine).

Twink
Posts: 436
Joined: 2003-03-31 23:31
Location: New Zealand

Post by Twink » 2004-01-05 19:51

diff and patch are very handy friends.

if you dont mind me asking what were the changes you were proposing to arnie?

Locked