Game Development Community

Your code changes + CVS

by Quest Johnny · in Torque Game Engine · 07/01/2004 (6:59 am) · 7 replies

When you have local code, and you want to do a CVS update.. won't the update obliterate all those code-changes you've made?

You can put your files elsewhere and then manually knit them back together, but it seems nasty. Is there a smarter way?

#1
07/01/2004 (7:07 am)
Your CVS client should be able to merge most things unless there were major changes/rearrangements in the file. I use Tortise CVSwww.tortoisecvs.org for most of my updates. Unfortuantely CVS clients arent that smart, but Tortise will redirect the merge to use a manual merge application of your choice for files it cant figure out. I use WinMerge winmerge.sourceforge.net. Still CVS does some screwy things sometimes so make sure you keep local backups.
#2
07/01/2004 (7:09 am)
While this link refers to Subversion instead of CVS, they are both version control systems, and the background information applies equally.

It's a good read for those unfamiliar with the theory behind version control systems!

Basic Concepts (of Version Control Systems)
#3
07/01/2004 (9:50 am)
Personally to be on the safe side I have a directory that is strictly a clean head version from cvs. I then have a directory from my head version (svn) and use winmerge to merge any new changes from cvs into my code base. If you do this on a timely basis it's not that bad of a task. Winmerge as mentioned above is a very useful tool. I've tried several other merge programs but that one is the easiest to use and it's free!

I actually prefer this manual merge method so I can see what changes are going into torque. If you haven't already I highly recommend that you implement either cvs or svn for your own code.
#4
07/01/2004 (10:19 pm)
I use Beyond Compare (http://www.scootersoftware.com), it's not free but it's only 30ish dollars, and well worth it iMHO.

You can compare a tree of files (i.e. GG's torque vs. your own), and quickly see which files are changed, and then double click the changed ones, and make the changes to your file line by line if you're so inclined (thus skipping changes you made, etc), you can also en masse copy parts of the trees to one another, or edit per line if you need to.

I use it for all manner of things too, at work I had to copy 4,000 odd files from one tree to another, the directory structures were similar but not identical, BC let's you choose which directories you compare, and is pretty smart when it comes to code differences and almost always guesses right when files have functions inserted between two existing functions (windiff or unix diff completely choke on such things).
#5
07/01/2004 (10:40 pm)
You may consider putting Torque on a Vendor Tag. You can find documentation about this on the red bean site.
#6
07/02/2004 (7:15 am)
I tried Beyond Compare, and now I'm trying Active File Compare (hint: saying 'compress space' is their funny way of saying 'ignore whitespace')
#7
07/02/2004 (11:24 am)
WinMerge it's very cool for that and Free 8-D

Kiss
Valerie