Fog Creek Software
Discussion Board




How do you use source code control?

I have never used source code control and was wondering how it works and if it's worth my time to even set it up?  I currently just make a separate copy of my application for each change or addition I make to the source and label the directory by date.

People
Wednesday, July 28, 2004

Ouch.

Source code control isn't too hard.  I use CVS and the TortoiseCVS client. 

I create a CVS project for each application I work on.  Tortoise integrates into Windows explorer and gives me extra options when I right-click on a file or directory.  To add a file to the repository, I just right-click and say add.  Same goes for delete.  When I've made a bunch of changes, I can right-click on the root directory of my project and click "commit" which adds all my changes to repository as new versions.  I can then roll back any particular file to a previous version.  You can also "tag" a group of files or the entire project and rollback a group of files to particular version.

Mostly I use it just so I don't have to manually copy files around.  It's also good for synchronizing the project across machines.  And, of course, you get backups for free (my CVS server is on another machine).

Almost Anonymous
Wednesday, July 28, 2004

==> I have never used source code control and was wondering how it works and if it's worth my time to even set it up? 

Only you can decide that. Why don't you invest the, oh, two hours, and get back with us and let us know.

Personally, I think they're "worth my time" -- even as a single developer.

We're currently making the switch to subversion+tortoise. Prior to that, we've been on VSS for about the last 6 years. Prior to that I used a package called Panvalet (IBM Mainframe). All were well "worth my time"

I

Sgt. Sausage
Wednesday, July 28, 2004

Look at Subversion; it has the advantage of being easily installable on a number of platforms, friendly docs for beginners, and a bunch of simplifying GUI tools if you're into that. It can be installed on your own machine without a server, etc. Even available on Cygwin.

The main advantage is deleting code is worry-free; I'm working on a free software doohickey, and 20 minutes ago my friend asked me if he could delete something. No big deal!

Also, it's always good to review diffs, which maybe I do obsessively.

So yeah, set it up on your local machine, tear it up, make mistakes, no big deal because it doesn't matter.

Tayssir John Gabbour
Wednesday, July 28, 2004

Source Control is a *must* for even the smallest projects.

It might not be ovbious at first, but once you try it you realize how awkward and inneficient is to develop anything without source control.

.NET Developer
Wednesday, July 28, 2004

"I currently just make a separate copy ..."

Then you are sort of already doing source control, but what you're doing manually is very easy to automate. Seems kind of inefficient to me.

Anony Coward
Wednesday, July 28, 2004

> I currently just make a separate copy of my application for each change or addition I make to the source and label the directory by date.

That's what I do sometimes. It works OK, provided that:

- No more than one person is working on the software ... in other words, "multi-user" features.
- You have the disk space to store mostly-duplicated copies of everything.
- You don't need to manage features accross multiple versions, e.g. "migrate a bug fix made to the version 6 source into the version 7 source, while not removing version 7 features that were added to these source files" ... in other words, "merge" features.
- You don't need a history of each file, with a description of why each change was made to each file (where, for example, one bug fix might change several files, and the same bug-fix comment should be applied to every file in that change-set).

Christopher Wells
Wednesday, July 28, 2004

Source control makes what you are doing easier, and much less error prone.  You seem to understand the need for multiple versions, so source control is a no brainer.

christopher (baus.net)
Wednesday, July 28, 2004

Here's a book just for folks like you:

http://pragmaticprogrammer.com/starter_kit/vc/index.html

Chris Winters
Wednesday, July 28, 2004


If you have a good backup system, are a single developer, and have some dumb luck, you should be fine.  I was for a couple years.

Of course, as your application(s) get more advanced, more developers get involved, you start selling and patching various versions, or a harddrive fails, you're going to need it.

KC
Thursday, July 29, 2004

More than once a week, there is a shout through the office that goes something like "who the F was editing the file I was working on?" There are 4 people here who edit code and content files.

When I bring it up in conversation that we lack SCC, Version control and content management, folks' eyes glaze over.

The Pragmatic Programmer book above is a good one. Also look at Coder to Developer.

I strongly advise SCC even if you are the only one writing the stuff. You never know when the next spyware trojan will wipe out your files. I believe that the ILoveYou virus attacked some code files (used CreateFile API call to turn them into 0 length files).

Peter
Thursday, July 29, 2004

Does anyone know of a good cvs system for osx? Mostly people recommend using "cvs" from the command line but I don't really like that method.

forthemac
Thursday, July 29, 2004

There's a Mac GUI CVS client...  it's at http://www.wincvs.org/

Almost Anonymous
Thursday, July 29, 2004

forthemac,

Mac CVS support is bad unless you pay some money for some shareware. Your biggest problem is that cvs does NOT know about resource forks. So you have to encode all your files with resource forks. If you are on pure unix or pure cocoa problems you won't have a problem as all files are flat, and besides XCode is all CVS aware anyway and you're all set.

If doing Carbon or anything compatible with old stuff or if you are putting files under cvs that have resource data like even clippings, it'll be worse unless you use one of the programs that does the conversion. I forget which one - most of the mac clients do not do it.

If anyone has source code to a command line program that can convert to and from AppleSingle format, please list it. Apple really needs to provide one of these with their standard distribution.

Then, in your makefiles, you'll need to set up special rules for all the files you have that have resource forks.

Dennis Atkins
Thursday, July 29, 2004

Dennis
Isn't there a way to wrap the files going into/out of CVS automatically? I thought there was, you put some magic on the CVS server and it runs the commands on the client.

mb
Thursday, July 29, 2004

Yeah, there is something about that in the ten million page CVS manual. I hope to figure it out someday...

Dennis Atkins
Friday, July 30, 2004

I only do a little playing with cocoa stuff so I'm not worried about that. I'm trying to use cvs for web dev. stuff. Mostly php, etc.  They are big apps with lots of scripts.

forthemac
Friday, July 30, 2004

I got so hooked up on TortoiseCVS and CVS that I set up my own CVS server with cygwin (It's easy) and now almost everything I do (private stuff, documents) is on CVS.

Maybe one of the reasons I like TortoiseCVS so much is the fact that when I started using CVS I had to use it through command line...

Love TortoiseCVS with passion. :-)

Marcelix
Sunday, August 08, 2004

*  Recent Topics

*  Fog Creek Home