The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
August 18, 2022, 03:56:56 am
Home Help Search Login Register
News: Paul & Fred have reached a settlement with Stardock!

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  Creating a diff or patch from a modded project.
« previous next »
Pages: [1] Print
Author Topic: Creating a diff or patch from a modded project.  (Read 1552 times)
Defender
Enlightened
*****
Offline Offline

Gender: Male
Posts: 815



View Profile
Creating a diff or patch from a modded project.
« on: May 03, 2012, 06:10:01 pm »

I need some help creating and applying a patch for shivers balance mod. I want to apply his changes to the current svn of 0.8. I tried some methods I searched for myself but they gave me errors and then I couldn't compile the source.

Places I tried but little success.
http://jungels.net/articles/diff-patch-ten-minutes.html
http://docs.moodle.org/dev/How_to_create_a_patch

I'm working with same source directories in both shivers mod and 0.8. I tried creating a .patch file from the differences in shivers mod compared to 0.7 uqm, and applying it gave some success some errors too. Compiling it was a no go.

I feel I'm on the right path but need some more guidance.
« Last Edit: May 04, 2012, 12:26:40 am by Defender » Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Creating a diff or patch from a modded project.
« Reply #1 on: May 03, 2012, 11:54:48 pm »

If some piece of code is modified both in the patch from 0.7 to SVN and in the patch from 0.7 to Shiver's mod, then the patch can't be automatically applied. You will need to find out how to merge the changed lines, which depends on the change, so you will have to figure out what it does.

Note that you should always make 'unified diff' patches (by supplying the '-u' option to diff). If the place where some part of the patch needs to be applied is only moved, then you'll still be able to apply (this part of) the patch in this case.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Defender
Enlightened
*****
Offline Offline

Gender: Male
Posts: 815



View Profile
Re: Creating a diff or patch from a modded project.
« Reply #2 on: May 04, 2012, 04:09:26 am »

Thank you meep for your time, but it's just not working the way I thought it would. There is over 300 changes between release 0.7 and 0.7 balance mod. My skills are just not up to par for something like this. I'll just play with the time mod I added to his project and go with it. Hopefully he will still support his mod in the future when uqm updates. But somehow I doubt it.
Logged
Gekko
*Many bubbles*
***
Offline Offline

Gender: Male
Posts: 199


Arena regular


View Profile
Re: Creating a diff or patch from a modded project.
« Reply #3 on: May 07, 2012, 12:52:57 am »

If he doesn't I will. After the 0.7.0 changes the mod isn't too hard to keep up-to-date. Applying the patch isn't that hard: Take a diff between the release 0.7.0 and balance mod, then use something like meld to do the merging. I'm sure most of the stuff is pretty much as it was back when the 0.7.0 port was finished.
Logged

Visit #uqm-arena and play a game of Net Melee!
Try the Net Melee Improvement mod
Defender
Enlightened
*****
Offline Offline

Gender: Male
Posts: 815



View Profile
Re: Creating a diff or patch from a modded project.
« Reply #4 on: May 07, 2012, 05:54:19 am »

Thanks Gekko, I will try my hand at it again, see what I can do.

 If it doesn't work, I'm handing you the torch to you Wink
Logged
Defender
Enlightened
*****
Offline Offline

Gender: Male
Posts: 815



View Profile
Re: Creating a diff or patch from a modded project.
« Reply #5 on: May 15, 2012, 01:51:00 am »

Gekko, if your still around and want to do it, I would not mind. I tried my hand at it but just can't seem to get it to work. I do not know of this "meld" you speak of as I'm doing this all from windows.
« Last Edit: May 15, 2012, 01:53:32 am by Defender » Logged
Death 999
Global Moderator
Enlightened
*****
Offline Offline

Gender: Male
Posts: 3866


We did. You did. Yes we can. No.


View Profile
Re: Creating a diff or patch from a modded project.
« Reply #6 on: May 15, 2012, 03:43:04 pm »

It's not a command - it's manually figuring out how to do both changes, or if one has to go, which one and whether there are any repercussions and if so how to deal with them.
Logged
Defender
Enlightened
*****
Offline Offline

Gender: Male
Posts: 815



View Profile
Re: Creating a diff or patch from a modded project.
« Reply #7 on: May 15, 2012, 07:26:33 pm »

If they're any conflicts from one code to the next, I wouldn't even know it let alone be able to fix them. I'm over my head on this one. Thank you for your response on the matter though.
Logged
Death 999
Global Moderator
Enlightened
*****
Offline Offline

Gender: Male
Posts: 3866


We did. You did. Yes we can. No.


View Profile
Re: Creating a diff or patch from a modded project.
« Reply #8 on: May 16, 2012, 04:11:01 am »

Well, often they'll be something really simple. If you're using the command-line svn tool, then you can request a diff. Just today I had a 'conflict' where I had indented something differently than in the svn repository. Obviously, I just said to go with the repository version.

It isn't always that easy, but it's worth checking.
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!