Painless way to merge own dev cvs with GG Head?
by Stefan Beffy Moises · in Torque Game Engine · 05/30/2002 (11:19 pm) · 21 replies
Hi there!
I've got my own CVS server running locally to organize my source, and of course I've modified numerous files, added new files, did this and that...
now everytime a new mindblowing feature appears in the GG Head, I've got a major problem (as the fixed recording function lately - I've tried to update my files by checking them via JEdit's Diff plugin, but then I realized my CVS is missing some files from an earlier change - connectionStringTable.*, which would affect much more files to change, which themselves would involve further changes, etc.)... how do I get it into my CVS without breaking everything, diffing every single file, getting dozens of CVS conflicts, etc.??
How are all the others handling this?
It can't be the best way, there must be something better than import it and then spend a couple of hours/days to solve all conflicts etc. ...
I know, the best would be to NOT change anything in the GG files and try to extend all the classes I'd like to add some features to, but sometimes you HAVE to make some changes, e.g. to the player class or whatnot...
So is there any guidance out there how to handle this intelligently?
Thanks a lot!
I've got my own CVS server running locally to organize my source, and of course I've modified numerous files, added new files, did this and that...
now everytime a new mindblowing feature appears in the GG Head, I've got a major problem (as the fixed recording function lately - I've tried to update my files by checking them via JEdit's Diff plugin, but then I realized my CVS is missing some files from an earlier change - connectionStringTable.*, which would affect much more files to change, which themselves would involve further changes, etc.)... how do I get it into my CVS without breaking everything, diffing every single file, getting dozens of CVS conflicts, etc.??
How are all the others handling this?
It can't be the best way, there must be something better than import it and then spend a couple of hours/days to solve all conflicts etc. ...
I know, the best would be to NOT change anything in the GG files and try to extend all the classes I'd like to add some features to, but sometimes you HAVE to make some changes, e.g. to the player class or whatnot...
So is there any guidance out there how to handle this intelligently?
Thanks a lot!
About the author
#3
05/31/2002 (7:34 am)
Excellent, I had the same question. Anyone know what that full CS-RCS is like then?
#4
05/31/2002 (9:03 am)
Why dont you use WinCVS to merge automatically with your code?
#5
05/31/2002 (9:30 am)
Cause WinCVS writes these ugly conflict stuff in the files and then you have to scan through all of them and get rid of those comments and try to figure out what it has done.... I prefer knowing what is going to conflict and what has changed before letting any program produce a mess... and I'm pretty sure WinCVS will produce a lot of mess once it's "unleashed"... so I prefer doing the mess myself, I guess, hehe ... ;-)
#6
1. Checkout a working copy from GG's CVS
2. Import this into a local module which is intended to mirror GG's CVS. You'll never ever make any changes to this, it is strictly so you have a local copy of GG's CVS, thus you can checkout new copies all you want w/o taxing GG's bandwidth.
3. Import this into your project's module. What I do is I start the project module with a copy of GG's HEAD, and then make my changes from there.
4. Every night I run a script which:
- Updates my working copy from step 1
- Repeats step two
- Repeats step three (just the import bit though)
The script then emails me the results. I also have a script that performs nightly builds, and emails me the results of that as well, but that's not particularly pertinant right now.
Some things to keep in mind.
- cvs import automatically merges any changes between the current code and the old code. I have yet to have cvs screw this up. I occasionally get failed merges, but the .rej files are trivial to merge.
- It's always a good idea to localize large changes to new files ... it's an oo engine, use it ;) This will make it much easier to prevent conflicts.
- When using cvs import with the GG tree, remember to use the -I flag ... cvs by default ignores anything named core, and there's an engine source directory named core.
- I actually maintain more than just the modules I referred to above. I have a torque-head-source module which just has an image of the engine source without the script / example stuff. Created with the same method as step 2, and updated nightly with the script from step 4. I just use the -I flag with cvs import to tell it to ignore the stuff I don't want. I use the same method to merge the nightly changes with my project source tree (since I don't merge changes with the game/example code, just the source code)
Hope this helps, I'm happy to answer any other CVS related questions ... been using it for FAR too long ;)
(edit) PS: I should note that I have my CVS repository on a unix server, and make ample use of shell scripts and automation to get the kickass functionality I need from CVS ;)
05/31/2002 (10:29 am)
OK ... I've been asked this question on the IRC channel several times, so I might as well post my method, which I've used on multiple projects for years. Handles multiple developers quite nicely as well ;)1. Checkout a working copy from GG's CVS
2. Import this into a local module which is intended to mirror GG's CVS. You'll never ever make any changes to this, it is strictly so you have a local copy of GG's CVS, thus you can checkout new copies all you want w/o taxing GG's bandwidth.
3. Import this into your project's module. What I do is I start the project module with a copy of GG's HEAD, and then make my changes from there.
4. Every night I run a script which:
- Updates my working copy from step 1
- Repeats step two
- Repeats step three (just the import bit though)
The script then emails me the results. I also have a script that performs nightly builds, and emails me the results of that as well, but that's not particularly pertinant right now.
Some things to keep in mind.
- cvs import automatically merges any changes between the current code and the old code. I have yet to have cvs screw this up. I occasionally get failed merges, but the .rej files are trivial to merge.
- It's always a good idea to localize large changes to new files ... it's an oo engine, use it ;) This will make it much easier to prevent conflicts.
- When using cvs import with the GG tree, remember to use the -I flag ... cvs by default ignores anything named core, and there's an engine source directory named core.
- I actually maintain more than just the modules I referred to above. I have a torque-head-source module which just has an image of the engine source without the script / example stuff. Created with the same method as step 2, and updated nightly with the script from step 4. I just use the -I flag with cvs import to tell it to ignore the stuff I don't want. I use the same method to merge the nightly changes with my project source tree (since I don't merge changes with the game/example code, just the source code)
Hope this helps, I'm happy to answer any other CVS related questions ... been using it for FAR too long ;)
(edit) PS: I should note that I have my CVS repository on a unix server, and make ample use of shell scripts and automation to get the kickass functionality I need from CVS ;)
#7
/me confused and tired... :-(
05/31/2002 (2:35 pm)
Hm, I've tried to diff/merge our files with the latest HEAD for the last couple of hours (WinCVS didn't do anything effective as I tried "import module", it would just run through all the files, but neither include new ones, merge conflicting ones, or anything else, so I decided to give it a try witch CSDiff), and now I get about 300 errors, but nearly all of them refer to the same file/position:../engine\dgl/gTexManager.h(288) : error C2065: 'tex' : undeclared identifier ../engine\dgl/gTexManager.h(288) : error C2227: left of '->texGLName' must point to class/struct/unionand every file using the texture manager throws this error now... does anybody have any idea where "tex" should be defined? The only file I found defining it is "tsMesh.cc", which doesn't seem to closely related to gTexManager ...
/me confused and tired... :-(
#8
WinCVS will rename yer modified files, and then I just come in with WinCVS and clean up.
05/31/2002 (7:27 pm)
Not necessarily painless, but I just to a clean update all the time.WinCVS will rename yer modified files, and then I just come in with WinCVS and clean up.
#9
Like you, I have run into problems with keeping my source code in-sync with GG. You might want to take a look at Araxis Merge. It is one of the best file comparison/merging and folder synchronization applications that I have used. Yes it is expensive (I purchased the Standard Edition), but the time it has saved me merging the code has been worth the cost (in my opinion). Below is the flow of how I keep my version of Torque in-sync with GG:
1) Update my local copy of Torque from GG repository
2) Using Araxis Merge compare the Torque folder to my customized version
3) Check-in the changed modules of my customized version to my local CVS server
After trying several of the 3rd party free tools, I have found that Araxis Merge is the best solution when it comes to merging my customized version (which is heavily modified) with GG.
Rich
06/03/2002 (2:53 am)
Stefan,Like you, I have run into problems with keeping my source code in-sync with GG. You might want to take a look at Araxis Merge. It is one of the best file comparison/merging and folder synchronization applications that I have used. Yes it is expensive (I purchased the Standard Edition), but the time it has saved me merging the code has been worth the cost (in my opinion). Below is the flow of how I keep my version of Torque in-sync with GG:
1) Update my local copy of Torque from GG repository
2) Using Araxis Merge compare the Torque folder to my customized version
3) Check-in the changed modules of my customized version to my local CVS server
After trying several of the 3rd party free tools, I have found that Araxis Merge is the best solution when it comes to merging my customized version (which is heavily modified) with GG.
Rich
#10
06/03/2002 (3:10 am)
Hey, thanks a lot! Sounds pretty cool, I will check this out!
#12
As I recall (clearing the cobwebs from my brain), when I tried WinMerge it would not allow you to automatically merge partial or show all merges when you used the directory compare feature. It has been about 8 months since I tried it, so there could have been updates to the code.
I was really hoping that I could have found a free program that offers that same functionality as Araxis Merge (since the standard edition cost more than the Torque engine). The key feature to me was the ability to merge in selective changes (e.g. lines that both GG and myself have changed). I have found this to be an invaluable feature.
Please let me know if you do come across a piece of software that provides the same functionality.
Rich
06/03/2002 (5:38 am)
Stefan,As I recall (clearing the cobwebs from my brain), when I tried WinMerge it would not allow you to automatically merge partial or show all merges when you used the directory compare feature. It has been about 8 months since I tried it, so there could have been updates to the code.
I was really hoping that I could have found a free program that offers that same functionality as Araxis Merge (since the standard edition cost more than the Torque engine). The key feature to me was the ability to merge in selective changes (e.g. lines that both GG and myself have changed). I have found this to be an invaluable feature.
Please let me know if you do come across a piece of software that provides the same functionality.
Rich
#13
Btw., do you find the "standard" edition suitable for you or do you miss some of the "professional" features?
06/03/2002 (5:52 am)
Wow, the selective feature will be hard to beat... but I'll keep searching... ;-)Btw., do you find the "standard" edition suitable for you or do you miss some of the "professional" features?
#14
At the time I purchased Araxis Merge, the two big differences (you can see them here) in the versions where:
1) The professional version could perform an automatic merge (not supported in the standard edition)
2) The professional version would allow you to perform a 3-folder comparison (standard edition allows only 2)
I am a bit gun shy of any software package performing an automatic merge and in my searching, I have yet to find a piece of software that can perform it accurately every time. As far as the 3-folder comparison, this is not a feature that I feel is a requirement in my current development environment.
I quick word about the cost difference between the standard and professional edition. I would have no problem paying the extra cost for the professional edition if I though the extra features would have saved more of my time.
Rich
*edit*
Fixed the above hyperlink
06/03/2002 (6:13 am)
Stefan,At the time I purchased Araxis Merge, the two big differences (you can see them here) in the versions where:
1) The professional version could perform an automatic merge (not supported in the standard edition)
2) The professional version would allow you to perform a 3-folder comparison (standard edition allows only 2)
I am a bit gun shy of any software package performing an automatic merge and in my searching, I have yet to find a piece of software that can perform it accurately every time. As far as the 3-folder comparison, this is not a feature that I feel is a requirement in my current development environment.
I quick word about the cost difference between the standard and professional edition. I would have no problem paying the extra cost for the professional edition if I though the extra features would have saved more of my time.
Rich
*edit*
Fixed the above hyperlink
#15
diff/merge tool which sounds pretty impressive:
Guiffy.
It's written in Java and therefore cross-platform (which would be ideal for TGE users...) - check it out and let me know what you think...
Stefan
06/06/2002 (7:35 am)
Richard, I've found another (commercial, but cheaper, a single user license is 79$)diff/merge tool which sounds pretty impressive:
Guiffy.
It's written in Java and therefore cross-platform (which would be ideal for TGE users...) - check it out and let me know what you think...
Stefan
#16
I first want to say thank you for passing on the information about Guiffy. I download it and spent about 45 minutes giving it a run through. There where two problems that I ran into:
1) The program gives you the ability to ignore certain sub-directories and files based upon extensions (from the menu Options->Folder Compare). I entered the below into the Ignore these SubFolders:
Debug;Release;WinDebug;WinRel;CVS;RCS;AfterMath;ROB;latex;doc;backup;cache;.xvpics;Work
I entered the below into the Ignore these File Types:
.obj .o .cab .exe .dll .map .pch .idb .mdp .opt .plg .ncb .vcp .aps .res .sbr .bsc .ilk .pdb .ide .class .tlb .hlp .lib .exp .pdf .zip .jar .dso .dle
Not only did the software not ignore what I had entered, but it did not save my settings when I exited the program. Now it could be my PC (Windows 2000 Professional with SP2) or it could be a bug in the software. You should give it a try and see if it works for you.
In my opinion, the ability of Guiffy to ignore directories or certain files is a key piece for me. This was a key feature that Araxis Merge provides and I have found to be invaluable.
2) I was not able to find an option that would allow me to merge only specific changes from one file to another. Again, Araxis Merge provides this feature. This feature has made merging the GG version with my as easy as point and click (which is one way you can do it with Araxis Merge)
I think if the developer fixes the ignore bug (unless it is my PC) and adds the ability to perform a selective merge, the product will be on a par with Araxis Merge.
Rich
06/06/2002 (10:54 am)
Stefan,I first want to say thank you for passing on the information about Guiffy. I download it and spent about 45 minutes giving it a run through. There where two problems that I ran into:
1) The program gives you the ability to ignore certain sub-directories and files based upon extensions (from the menu Options->Folder Compare). I entered the below into the Ignore these SubFolders:
Debug;Release;WinDebug;WinRel;CVS;RCS;AfterMath;ROB;latex;doc;backup;cache;.xvpics;Work
I entered the below into the Ignore these File Types:
.obj .o .cab .exe .dll .map .pch .idb .mdp .opt .plg .ncb .vcp .aps .res .sbr .bsc .ilk .pdb .ide .class .tlb .hlp .lib .exp .pdf .zip .jar .dso .dle
Not only did the software not ignore what I had entered, but it did not save my settings when I exited the program. Now it could be my PC (Windows 2000 Professional with SP2) or it could be a bug in the software. You should give it a try and see if it works for you.
In my opinion, the ability of Guiffy to ignore directories or certain files is a key piece for me. This was a key feature that Araxis Merge provides and I have found to be invaluable.
2) I was not able to find an option that would allow me to merge only specific changes from one file to another. Again, Araxis Merge provides this feature. This feature has made merging the GG version with my as easy as point and click (which is one way you can do it with Araxis Merge)
I think if the developer fixes the ignore bug (unless it is my PC) and adds the ability to perform a selective merge, the product will be on a par with Araxis Merge.
Rich
#17
I tried it, too, and I can verify the shortcomings you've mentioned... the excluded files aren't really excluded, and it seems to loose the settings for folders to ignore... I've typed in CVS to ignore my CVS folders, and it really seemed to ignore them, but the next time I've opened the options dialog, the CVS entry was gone... strange... and it didn't ignore *.obj etc. files at all... also, it really seems to not support selective merging...
but maybe we can contact the author and ask him to check these points - cause it seems to be a great tool otherwise, it's cheaper than Araxis and it's cross-platform...
06/08/2002 (2:21 pm)
Richard, thanks for checking it out!!I tried it, too, and I can verify the shortcomings you've mentioned... the excluded files aren't really excluded, and it seems to loose the settings for folders to ignore... I've typed in CVS to ignore my CVS folders, and it really seemed to ignore them, but the next time I've opened the options dialog, the CVS entry was gone... strange... and it didn't ignore *.obj etc. files at all... also, it really seems to not support selective merging...
but maybe we can contact the author and ask him to check these points - cause it seems to be a great tool otherwise, it's cheaper than Araxis and it's cross-platform...
#19
06/10/2002 (4:25 am)
Richard, either way would be okay for me, but maybe it's better to post it here in this thread, I'm sure a lot of people around here are interested in getting a powerful and affordable merging tool (which Guiffy would be once these shortcomings are resolved...)!
#20
I have received a response from Mr. Ritcher in regards to the bugs we have found. I have to say that I am impressed that he has taken the time to test and validate the bugs we found, considering we have yet to license his software. This could be very beneficial in the future.
As far as Mr. Ritcher not being able to produce Bug #1 (see email below), it was a user error. When I restarted Guiffy, I did not reset the ignore fields back. I have sent a follow up email to Mr. Ritcher explaining this. Below is the actual email that I received:
Rich
06/10/2002 (7:08 am)
Stefan,I have received a response from Mr. Ritcher in regards to the bugs we have found. I have to say that I am impressed that he has taken the time to test and validate the bugs we found, considering we have yet to license his software. This could be very beneficial in the future.
As far as Mr. Ritcher not being able to produce Bug #1 (see email below), it was a user error. When I restarted Guiffy, I did not reset the ignore fields back. I have sent a follow up email to Mr. Ritcher explaining this. Below is the actual email that I received:
Subject: Re: Folder Compare Options To: "Richard F. O'Brien" <rfob@optonline.net> Richard, Thanks for the BUG report. The 2nd and 3rd bugs were easily reproduced. YUCK!!! The Ignore File Types were always getting set in the Ignore SubFolders. This bug will be fixed in the next release. Ignore SubFolders is working(But you can't tell)...Ignore FileTypes was developed/released after IgnoreSubFolders and the bug you found causes the SubFolders to be ignored to always be the IgnoreFileTypes. The 1st bug - "did not ignore all of the file types" is NOT easily reproduced. Is that what you meant, or did you mean to say that ignore subfolders wasn't working? If Ignore FileTypes is what you meant, I may need more information to reproduce and fix the problem. THANKS, Bill Ritcher CEO - "Chief Everything Officer" Guiffy Software, Inc. 760.443.3080 ----- Original Message ----- From: Richard F. O'Brien <rfob@optonline.net> To: <Bug_Report@Guiffy.com> Sent: Monday, June 10, 2002 3:42 AM Subject: BUG: Folder Compare Options > I believe that I have found a bug in your software. Below are steps > required to reproduce the bug: > > 1) Start Guiffy > > 2) Bring up the Folder Compare Options dialog box (from the menu > Options->Folder Compare). > > 3) Make sure the Show SubFolders (Recursively) checkbox is selected > > 4) Enter the below into the Ignore these SubFolders: > > Debug;Release;WinDebug;WinRel;CVS;RCS;AfterMath;ROB;latex;doc;backup;cache;. xvpics;Work > > 5) Enter the below into the Ignore these File Types: > > .obj .o .cab .exe .dll .map .pch .idb .mdp .opt .plg .ncb .vcp .aps .res > .sbr .bsc .ilk .pdb .ide .class .tlb .hlp .lib .exp .pdf .zip .jar .dso .dle > > 6) Make sure the Ignore Modified Date and Time is selected checkbox is > selected > > 7) Make sure the Ignore File Size checkbox is selected > > 8) Make sure the Verify Files Match checkbox is selected > > 9) Select the Binary(byte-by-byte) compare radio button is selected > > 10) Select the <OK> pushbutton > > 11) From the menu select File->Open&Compare Folder > > 12) Key in two folders to compare. NOTE: They will need to contain some of > the subfolders and file types listed above to see this bug > > 13) Select the <Compare> pushbutton > > Once the folder comparison is complete, you will see that the software did > not ignore all of the file types that where listed above. Which file types > where actually ignored appear to change each time I run the software. The > second bug can now be easily seen by bring up the Folder Compare Options > dialog box (step #2 above). You will notice that the values that where > keyed into the Ignore these File Types entry field are now in the Ignore > these SubFolders entry field. The third bug can be seen by stopping then > starting the program. When you open the Folder Compare Options dialog box > (step #2 above), you will see that it did not save the Ignore these File > Types and put the values that where in this field into the Ignore these > SubFolders field. > > System Information: > > Guiffy 4.2 - Build 57 Evaluation Copy > JDK/JRE - 1.4.0 > Windows 2000 Professional with SP2 > > If there is other information that you require, please do not hesitate to > contact me. > > Thank you for your time. > > Rich > >
Rich
Torque 3D Owner Frank Bignone
Darkhand Studio