how to track the last lines you modified

Member
Posts: 749
Joined: 2003.01
Post: #1
I often add a feature to my game (having to change the code in quite a few points), then re-run it, and experience unexpected behaviour or something (well i guess this happens to everyone...)

It would be really helpful if there was a way to check out which were the latest lines you modified/wrote so you can check them for mistakes (like some sort of controller that could take you to the latest line you wrote, then the one before... so you can re-check the latest stuff you wrote without having to remember exactly what you added-changed)

©h€ck øut µy stuƒƒ åt ragdollsoft.com
New game in development Rubber Ninjas - Mac Games Downloads
Quote this message in a reply
Moderator
Posts: 592
Joined: 2002.12
Post: #2
If you use some kind of source control, such as Subversion, then you can do a diff from your last working code to see what you changed.
Quote this message in a reply
Member
Posts: 749
Joined: 2003.01
Post: #3
that could work but it's a bit overkill... meaning you would need to save a new version every time you add something

©h€ck øut µy stuƒƒ åt ragdollsoft.com
New game in development Rubber Ninjas - Mac Games Downloads
Quote this message in a reply
Moderator
Posts: 592
Joined: 2002.12
Post: #4
That is the whole idea of version control. When something works you save a version.
Quote this message in a reply
Member
Posts: 749
Joined: 2003.01
Post: #5
still i believe my idea could be useful for people that dont want to make a new file every 10 lines

©h€ck øut µy stuƒƒ åt ragdollsoft.com
New game in development Rubber Ninjas - Mac Games Downloads
Quote this message in a reply
Moderator
Posts: 508
Joined: 2002.09
Post: #6
Make backup copies of each version you modify, but that IS overkill.

"When you dream, there are no rules..."
Quote this message in a reply
Moderator
Posts: 1,560
Joined: 2003.10
Post: #7
Najdorf Wrote:still i believe my idea could be useful for people that dont want to make a new file every 10 lines
As I recall, Subversion only saves the diff from the previous revision, not the entire file. It pieces files together for you when you request a particular revision.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #8
Subversion is what you want. It's not "overkill" in any sense.

SubEthaEdit has change hilighting, but only whilst it's open -- as soon as you quit, or close a document, the change information is lost. It also only shows you the new text, not both.
Quote this message in a reply
Member
Posts: 469
Joined: 2002.10
Post: #9
Along these lines I kinda wish XCode had Eclipse's compare to local history feature.

---Kelvin--
15.4" MacBook Pro revA
1.83GHz/2GB/250GB
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #10
Najdorf Wrote:still i believe my idea could be useful for people that dont want to make a new file every 10 lines

Like was said else where, that's not exactly the case with Subversion, but what difference would it make if it was? Source files aren't that big to begin with. It may seem silly to commit your project every 2 minutes, but if that helps, what difference does it make? You certainly aren't going to run out of disk space from source files.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Member
Posts: 198
Joined: 2005.01
Post: #11
Not only that, but Subversion manages changelists (repo versions, whatever) and not just individual file histories. So you can commit when it works, then go scribble over whatever the heck you want, and if anything is broken you can see all your changes across all your files since the last good commit, and if something turns out to be broken after you've already committed more stuff, you can see what changed with what.

EDIT: Wow, that was a run-on.. Grin Time for sleep...

Cryptic Allusion Games / Cryptic Allusion, LLC
http://www.cagames.com/
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  OpenGL Velocity and Grouping of Lines (C++, Xcode) TheThirdL3g 2 3,240 Jul 29, 2010 01:28 PM
Last Post: SethWillits
  Call For Help: The Game Track Open Source Project jolivierld 2 2,606 Aug 30, 2005 03:48 AM
Last Post: jolivierld
  Keeping track of bullets Bossa Nova 3 2,617 Jun 26, 2003 09:09 PM
Last Post: OneSadCookie