Author Topic: Ship.cpp Version  (Read 6163 times)

0 Members and 1 Guest are viewing this topic.

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
I noticed that in CVS, ship.cpp versions go up to 2.440, but in SVN, they only go up to 2.336.2.86.  This effectively eliminates ship templates.  I just wanted to ask - is there a reason for this?

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
It's a difference in stable/unstable trees.  HEAD in CVS is unstable, but in SVN it's stable.  We did that because too many people were getting confused and using the wrong code tree.  The version numbers you list are a dead giveaway of the change, with "2.336.2.86" indicating that it's from the stable code that was branched at HEAD version 2.336.  That doesn't preclude any particular bit of code from being from a post 2.336 HEAD version also being the stable tree, but it would only be in both if the coder committed to both, which isn't the case with Turey's ship template feature.

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
I see...

 

Offline Mars

  • I have no originality
  • 211
  • Attempting unreasonable levels of reasonable
HEAD = stable?

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
HEAD = stable?
There is actually no longer a "HEAD" like we had with CVS.  In the SVN trunk there is "fs2_open", which is the stable code tree, and "fs2_open-unstable", which is for unstable code. 

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Yeah, that terminology alone sounds like it should really help clear up a lot of the confusion.  Plus I like SVN more anyway.  Makes me all warm and fuzzy inside.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Turey

  • Installer dude
  • 211
  • The diminutive form of Turambar.
    • FreeSpace Open Installer Homepage
I could cross-commit if someone actually needed the code...

or someone else could do it, it's not complicated code.
Creator of the FreeSpace Open Installer.
"Calm. The ****. Down." -Taristin
why would an SCP error be considered as news? :wtf: *smacks Cobra*It's a feature.

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Is the ship template code stable?

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Is the ship template code stable?
I previewed it before it ever hit CVS and I thought it was good enough for stable.  If you want to do up a patch of that code for SVN stable then I can go ahead and commit it.

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Is the ship template code stable?
I previewed it before it ever hit CVS and I thought it was good enough for stable.  If you want to do up a patch of that code for SVN stable then I can go ahead and commit it.

I'll see if I have time later this week.

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Is the ship template code stable?
I previewed it before it ever hit CVS and I thought it was good enough for stable.  If you want to do up a patch of that code for SVN stable then I can go ahead and commit it.

Wow.  I thought that this would only involve moving a few blocks of code from the CVS branch to the SVN one (or whatever).  I never realized that I would have to move large blocks of code around and between functions :shaking: Well, anyway, I did it, and it not only compiles and doesn't cause my computer to explode, but it actually seems to work.  I don't know how to commit (and probably shouldn't be, considering how new I am to this whole SCP thing), but the required source files are attached ( required_string_4 had to be added to the parse files).

EDIT: I hope I removed all the weird all caps comments I use to navigate around the code :nervous:

[attachment deleted by ninja]

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Wow.  I thought that this would only involve moving a few blocks of code from the CVS branch to the SVN one (or whatever).  I never realized that I would have to move large blocks of code around and between functions :shaking: Well, anyway, I did it, and it not only compiles and doesn't cause my computer to explode, but it actually seems to work.  I don't know how to commit (and probably shouldn't be, considering how new I am to this whole SCP thing), but the required source files are attached ( required_string_4 had to be added to the parse files).
Had time to give it a better look, so...

1)  Please always diff rather than sending already patched code.  Otherwise we have to diff it first and it just makes everything more difficult since if the files are out of sync then a lot of changes will get identified which aren't related to anything that you did.

2)  There is a LOT more in there that has nothing to do with ship templates, about 15 to 20 times more.  Please only include what is necessary to add in ship templates.  Other changes should be in separate diffs, so that if something causes a problem we don't have to rip out all of the code to fix it.  It also makes it significantly easier to review the diff if it's all for one particular set of changes and doesn't include so much unnecessary stuff.

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
1) I see the problem here, but how do I diff?

2) I didn't purposefully make any changes that didn't need to be made for the ship template code to work.  What had to be done is moving a very large chunk of code into a new function (I was looking at how it was done in the unstable branch code, this looked like the best way to do it - the new function is parse_ship_info.  If it was not in a new function, that huge block of code would have to appear twice) as well as adding a few functions that the code required.  EDIT: Worth noting that file comparison programs usually cannot make sense of changes like this.  Everything is basically set up the same way it was in the unstable branch code, but with the changes made to the stable code since it was branched.  What code specifically are you talking about?
« Last Edit: April 03, 2008, 11:07:26 pm by blowfish »

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
1) I see the problem here, but how do I diff?
"svn diff"

Quote
2) I didn't purposefully make any changes that didn't need to be made for the ship template code to work.  What had to be done is moving a very large chunk of code into a new function (I was looking at how it was done in the unstable branch code, this looked like the best way to do it - the new function is parse_ship_info.  If it was not in a new function, that huge block of code would have to appear twice) as well as adding a few functions that the code required.  EDIT: Worth noting that file comparison programs usually cannot make sense of changes like this.  Everything is basically set up the same way it was in the unstable branch code, but with the changes made to the stable code since it was branched.  What code specifically are you talking about?
If you diff it you will see all that is changed.  Also remember that the unstable branch is older compared to the stable branch, so things are seldom newer or better in there.

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
I know that the unstable branch is older.  I used the stable branch code, but put into a format similar to that of the ship template stuff in unstable branch (its difficult to explain this).  It needs to be in this format for the ship template code to work.  Let me try to explain.  The "meaty" part of the ship parse code needs to be used both to parse ships and templates, and also needs to be accessed from different parts of ship.cpp.  This requires it to be put into a new function (parse_ship_data).  Rather than just copying the parse_ship_data function from the unstable code, I took the ship parse code from the stable code and transplanted it into parse_ship_data (with minor changes required for ship templates).  This change, when interspersed with other minor changes, seems to cause file comparing programs (I used File Merge, I have been having a little trouble getting svn diff to work :nervous:) to misinterpret the change, showing the large chunks of code to be added or removed, rather than just moved.

EDIT: How do I use svn diff to compare two files?  It won't let you compare a path to a url, so I can't compare my copy to the one in SVN, and it won't let you compare a non-versioned copy, so I can't compare a copy on my comp to another copy on my comp.
« Last Edit: April 04, 2008, 12:36:00 am by blowfish »

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
User here. I'd love to use Turey's ship template code (soon, if possible) so if you're waiting for someone to use it, I am.
It's for the Star Wars mod, so we can have Imperial and Rebel repaints and rearmaments of the same ship class, like the Nebulon B.
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
I would love to see it too.  That's why I'm trying to get it into the stable branch, but my n00bishess seems to be getting in the way :nervous:

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Odd.  If I put my version on the left side in FileMerge instead of the right, then it doesn't show all of the weird random changes that I didn't make (but still shows a bunch of spacing differences I am not responsible for).

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Umm ... taylor, could you please elaborate on the kind of random changes that appeared that you said had nothing to do with ship templating?  When I compare them, I get 274 differences (of which at least 90% are spacing changes I didn't make), and the rest are stuff that has to do with ship templates.  I can understand if you are getting a little frustrated with me right now, but if I'm missing something obvious, then I'd like to know about it.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
I've been out of town, so I haven't had a chance to go back over it again.  I'll have to get back with you about it in a day or two when I get more time to work on FSO stuff.