Author Topic: Version control  (Read 26249 times)

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Version control
« on: June 20, 2010, 05:36:14 PM »
So I heard that people use version control like all the time. I have never used that tool and I don't know why I should do that. Is it strange just make backup copies of the current source?

EdR

  • Newcomer
  • Posts: 19
  • Karma: +0/-0
    • View Profile
    • Email
Re: Version control
« Reply #1 on: June 20, 2010, 06:21:51 PM »
Yes, it is strange, because it doesn't give you the benefits of version control--which are essentially irrefutable.

Version control (usually) stores deltas of files. Changes are recorded, not entirely new files, along with a commit message--a message saying what these changes are. This lets you do a lot of things: you can trace the change of a file, you can effortlessly see the changes that might have introduced a new bug (i.e. if there's a bug in SomeObject, you can do a diff on SomeObject.cpp from revision to revision and see what's changed). It allows for much more coordinated collaboration between developers on the same project--two developers can work even on the same file, and so long as their changes don't directly override each others', any good version control system will merge your commits. If they do overlap, you'll be in a state of conflict, and you can resolve the conflicts manually and commit the fixed version in.

EDIT: For the sake of example: me and my devs have been working on Sharplike for about three weeks. We have around 270 commits from three developers. We regularly break things, and we regularly revert out to known-working versions and just keep on trucking. This vastly improves our productivity and lets us concentrate on working, instead of trying to remember what we did when we screwed something.

Basically: there's no good reason not to use version control.
« Last Edit: June 20, 2010, 06:24:08 PM by EdR »

Slash

  • Creator of Roguetemple
  • Administrator
  • Rogueliker
  • *****
  • Posts: 1203
  • Karma: +4/-1
    • View Profile
    • Slashie.net
    • Email
Re: Version control
« Reply #2 on: June 20, 2010, 08:37:40 PM »
It also helps when you work from several workstations, you can keep the source code in a central location and not worrying about "where is the latest version". You can even abandon the project and come back months later, and the latest version will still be there.

The benefits for team working are undeniable of course

corremn

  • Rogueliker
  • ***
  • Posts: 700
  • Karma: +0/-0
  • SewerJack Extraordinaire
    • View Profile
    • Demise RogueLike Games
Re: Version control
« Reply #3 on: June 21, 2010, 12:37:16 AM »
And of course using a online repository means your code wont be lost to the ages.
corremn's Roguelikes. To admit defeat is to blaspheme against the Emperor.  Warhammer 40000 the Roguelike

stu

  • Rogueliker
  • ***
  • Posts: 138
  • Karma: +0/-0
  • Moop!
    • View Profile
    • Stu's Rusty Bucket
Re: Version control
« Reply #4 on: June 21, 2010, 02:02:01 AM »
offsite backup (assuming you push your repo away from your local machine).. tracking changes, branching, merging, rolling back.. also helps that I code on my workstation and laptop and I can checkout/build and test on multiple machines..

so yeah your and odd duck krice :P but you knew that... ;) just dont pick subversion, its crap.
--/\-[ Stu ]-/\--

EdR

  • Newcomer
  • Posts: 19
  • Karma: +0/-0
    • View Profile
    • Email
Re: Version control
« Reply #5 on: June 21, 2010, 05:13:35 AM »
CVS is crap. RCS is crap. Subversion is excellent at what it does.

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Version control
« Reply #6 on: June 21, 2010, 05:30:31 AM »
Well none of those features are something I need, and using a version control seems to me like extra work for no obvious reason (for a solo developer like myself).

purestrain

  • Rogueliker
  • ***
  • Posts: 172
  • Karma: +0/-0
    • View Profile
Re: Version control
« Reply #7 on: June 21, 2010, 06:25:53 AM »
so yeah your and odd duck krice :P but you knew that... ;) just dont pick subversion, its crap.


Would agree that. Use e.g. mercurial - its very easy and distributed. You can do local commits too, no scrap .svn folders in each subdirectory.

I'm currently developing alone, too but it gives me the following benefits:
- Track changes for later changelog
- Visible progress
- Revert stupid changes
- Support multiple versions (e.g. bugfix in branch 0.6 => 0.6a, main development on trunk)
- Backups

Just use it

ido

  • Rogueliker
  • ***
  • Posts: 618
  • Karma: +0/-0
    • View Profile
    • Tame Tick
Re: Version control
« Reply #8 on: June 21, 2010, 11:32:39 AM »
It's so easy to use that the question you need to ask yourself isn't "why should I use a VCS?" but "why shouldn't I use a VCS?".

At the very least it's easier than manually copying and zipping folders.

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Version control
« Reply #9 on: June 21, 2010, 01:02:03 PM »
At the very least it's easier than manually copying and zipping folders.

Really? Is there a non-sucky version control I could try (probably with my new roguelike EFT).

Etinarg

  • Rogueliker
  • ***
  • Posts: 424
  • Karma: +1/-1
  • Idea archivist and game tinkerer.
    • View Profile
    • Gedankenweber Blog (German)
Re: Version control
« Reply #10 on: June 21, 2010, 02:20:59 PM »
I made good experiences with CVS, but that will be called horribly outdated as of now.

GIT is the latest hype I hear. Should be easy enough to set up, I guess. It's fast, safe and distributed, doesn't need a central server repository or anything like that.
« Last Edit: June 21, 2010, 02:22:36 PM by Hajo »

george

  • Rogueliker
  • ***
  • Posts: 201
  • Karma: +1/-1
    • View Profile
    • Email
Re: Version control
« Reply #11 on: June 21, 2010, 02:27:59 PM »
I've heard that git is a little more involved than mercurial, but I only have experience with mercurial. That said, mercurial is dead simple to use.

EdR

  • Newcomer
  • Posts: 19
  • Karma: +0/-0
    • View Profile
    • Email
Re: Version control
« Reply #12 on: June 21, 2010, 03:09:34 PM »
Unless you are developing exclusively with Unix-based developers, git (it's not capitalized, by the way) is considerably inferior to Mercurial.

stu

  • Rogueliker
  • ***
  • Posts: 138
  • Karma: +0/-0
  • Moop!
    • View Profile
    • Stu's Rusty Bucket
Re: Version control
« Reply #13 on: June 22, 2010, 01:08:17 AM »
Mercurial is considerably inferior to git imo. but mostly don't care what anyone else uses.
--/\-[ Stu ]-/\--

purestrain

  • Rogueliker
  • ***
  • Posts: 172
  • Karma: +0/-0
    • View Profile
Re: Version control
« Reply #14 on: June 22, 2010, 06:46:24 AM »
Maybe you both could explain a litte bit more about the pros/cons of using mercurial/git (not any technical things how something is implemented)t? I have tried both for some weeks but found them equally good.

In the end i decided to use mercurial because of its support of multiple platforms and good integration into eclipse.