Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: blowfish on May 12, 2008, 07:11:43 pm

Title: How do you create a diff?
Post by: blowfish on May 12, 2008, 07:11:43 pm
I have been experimenting with the source code, and I was wondering how you create a diff, since those seem to be the standard method of exchanging code changes.  Does anyone know how? :confused:
Title: Re: How do you create a diff?
Post by: phreak on May 13, 2008, 12:03:43 am
Assuming you have TortoiseSVN:

Right click on File in question
Go to the TortoiseSVN option
Select "Create Patch" (near the bottom)
Save the diff file to wherever and upload it.  We will then take a look at what you've changed and possibly incorporate the code into the build.  If it is a good new feature or a bug fix, we would like to have some submissions like that before giving you direct write access.
Title: Re: How do you create a diff?
Post by: blowfish on May 13, 2008, 12:05:21 am
I actually don't have TortiseSVN :( (I am on a mac)
Title: Re: How do you create a diff?
Post by: phreak on May 13, 2008, 12:53:44 am
Well that's your own fault then  :blah:

I guess since the Mac OS unix-like, you can open up a console and do this

svn diff filename_in_question.cpp > output.diff
Title: Re: How do you create a diff?
Post by: blowfish on May 13, 2008, 01:07:58 am
Thanks, that worked.  But is there a way to get it to ignore white space?
Title: Re: How do you create a diff?
Post by: Nuke on May 13, 2008, 01:09:31 am
oh goodie, i was about to ask the same thing. didn't know tortoise had a patcher.
Title: Re: How do you create a diff?
Post by: Wanderer on May 13, 2008, 01:28:00 am
You could probably also use one of the other GUIs for SVN revisions.. http://en.wikipedia.org/wiki/Comparison_of_Subversion_clients There seems to be quite a few of those for Macs. With tortoise the patching was really simple.. Just using 'create patch' to 'save' your changes as a diff, reverting the changes and then applying a patch.
Title: Re: How do you create a diff?
Post by: phreak on May 13, 2008, 04:34:13 pm
Thanks, that worked.  But is there a way to get it to ignore white space?


svn diff -x -w filename_in_question.cpp > output.diff
Title: Re: How do you create a diff?
Post by: blowfish on May 13, 2008, 05:37:27 pm
Thank you, that worked.