How to create a patch file for code contributions

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

How to create a patch file for code contributions

Postby Graveen » Sat Mar 07, 2009 7:17 pm

The goal is to create diff patch files, with the latest SVN.
Diff patchs are so called because they easily make changes on the files they target.
The test of the code submitted is an hard process, and sometimes we ended up in a non compatible patch. Having a diff is better for everyone using the SVN;
You can, of course, and i invite you to do the same, put the code changes inline, to help comprehension of your patch!

WHY SHOULD WE USE DIFF PATCHES ?
1) patch is far more precise than code: this is a guarantee your code is compatible and not outdated with actual SVN
2) patch is really light, and can be putted inline or attached in a post
3) patch allows the code developers to quickly test and deploy your patch

WHEN SHOULD WE CREATE DIFF PATCHES ?

As often as you can, for the previous reasons.
Of course, you can put code inline for discussion and explain your changes.

TO CREATE A PATCH
1) prepare the changes, get the DoL SVN.
2) commit your changes to your local repository
3) once tested, simply right clic with Tortoise on the root folder of the SVN, menu TortoiseSVN -> create Patch
4) select the files you want to put in the diff patch
5) click ok, your patch file is created

APPLYING A PATCH
1) download the patch, or create it with notepad (give him .patch extension)
2) right click on your root SVN directory, TortoiseSVN -> apply Patch
3) browse for your patch file, right clic on the Files patches windows -> apply all
4) your patch is now deployed

Graveen
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: How to create a patch file for code contributions

Postby Dinberg » Sun Mar 08, 2009 10:48 am

I Cleaned up some English mistakes Graveen, I'll have a look at rephrasing some things later. Also Stickied it, and moved it to DoL Contributions and Development :D
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim

Re: How to create a patch file for code contributions

Postby BackTrack » Mon Mar 09, 2009 5:36 pm

Hm didn't know about that .patch function in SVN, cool :)
Drop windows, Run Linux
Image
BackTrack
DOL Experienced
 
Posts: 162
Joined: Sun Oct 05, 2008 5:26 am

Re: How to create a patch file for code contributions

Postby DrStrange » Sat Jul 04, 2015 9:26 pm

TortoiseSVN to patch a file does not work at all. GL though.
DrStrange
 

Re: How to create a patch file for code contributions

Postby Graveen » Sun Jul 05, 2015 9:09 am

It was working flawlessly: i doubt it didn't. Generally the patch file is mis-formed, rather than the tool.
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: How to create a patch file for code contributions

Postby DrStrange » Fri Jul 10, 2015 10:21 pm

It's ok I am learning all the scripting myself, already have many things working however there is a pile of outdated an things,additions etc I want to do. I am using this and a couple other emulators as learning ground for c# atm.
DrStrange
 


Return to “%s” DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 1 guest