View Full Version : how to track the last lines you modified
Najdorf
2006.06.11, 02:06 PM
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)
BeyondCloister
2006.06.11, 02:18 PM
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.
Najdorf
2006.06.11, 02:43 PM
that could work but it's a bit overkill... meaning you would need to save a new version every time you add something
BeyondCloister
2006.06.11, 02:44 PM
That is the whole idea of version control. When something works you save a version.
Najdorf
2006.06.11, 02:52 PM
still i believe my idea could be useful for people that dont want to make a new file every 10 lines
Taxxodium
2006.06.11, 03:16 PM
Make backup copies of each version you modify, but that IS overkill.
ThemsAllTook
2006.06.11, 03:26 PM
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.
OneSadCookie
2006.06.11, 05:32 PM
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.
kelvin
2006.06.11, 09:12 PM
Along these lines I kinda wish XCode had Eclipse's compare to local history feature.
Skorche
2006.06.12, 02:06 AM
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.
Dan Potter
2006.06.12, 03:24 AM
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.. :D Time for sleep...
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.