|
From: Greg T. <gr...@sp...> - 2002-02-24 07:44:36
|
A patch is basically a file that other people can use to update their code based on the contents of your patch file. In the patch file is a detailed list of things that you changed on your copy of the file from the main CVS located on SF. This is detailed up to the line. It documents lines that are added, deleted, or modified. Not all of the contributors to the DoTT project have CVS, and it's not neccessary for all of them to have it since we have the ability to patch. For those of you who wish to contribute code but don't have an account with access to the developer CVS account, start by getting a copy of the code. cvs -z3 -d:pserver:ano...@cv...:/cvsroot/dott co dott10 A bunch of files should fly by and depending on your connection speed, you'll either get it quick or around 15-20 mins worth (Approx 4-5 MB or so). A dott10 dir will be created in your current directory. If you already have a copy of our code, first make sure your copy is up to date by either typing the command above from one level above the dott10 directory, or by manually updating file(s) by typing cvs update <filename> Make SURE to do this before you even think of changing something. This will merge the SF CVS with your file. If you have changed something and need the newest copy of the file, you may still cvs update and attempt to merge it. This usually works unless your work crosses over work submitted after your version of the file was released. Which is why you should always keep your source up to date and the patches should be submitted as soon as possible to avoid conflicts. From there you can cd to the dir, change something, then create a patch file of your changes cvs diff <yourfile> <filetocompare> > <diffname> Your file is the name of the file you changed. Filetocompare is the name of the file on the CVS archive, which should almost always be the same as Yourfile. The > signifies that you're dumping the output from the command in to a file. If you remove the stuff after filetocompare and hit enter, you'll see the diff text. Diffname is the name of the cvs diff (Or patch) file to create. This should be yourfile.diff. IE, I change mud.h, my diff file is mud.h.diff. Submitting patches happens through the SF website. When you go to the Dawn of the Titans projet, there is a heading 'Public Areas' which contains a 'Tracker' section, which has a 'Patches' link. If you click on 'Patches', you end up in the Patches Tracker, and you can click on 'Submit New' to submit a new patch. When submitting patches, try not to submit multiple changes. I know this is sometimes unavoidable, but try to split more minor changes in to different patches so we can see more of what exactly was changed. IE: Don't go edit the code and just do whitespace/format rearranging AND add or modify code too. We can't tell what was added if you do that :) Applying patches to MUD source happens through 'patch'. How you need to run patch depends on how the original diff was created, but in general you do 'patch -p0 < /path/to/patchfile' in the directory that contains the files that will be updated. If you have no existing source or want to update directly from the CVS which is basically the same as applying a patch, type this: cvs -z3 -d:pserver:ano...@cv...:/cvsroot/dott co dott10 This will merge the current CVS with your local code. The dott10 directory will be created or updated from your current directory. It's usually best to be IN your home dir when doing this. CVS is still a bit foreign to me, so please tell me if there are any errors in this post. There probably are, but this will do for now to start :) Grant Blackman - Project Administrator |