views:

682

answers:

13

I'm looking for good suggestions on how to implement version and source control for web projects.

I've looked into subversion, but it seems to only take care of code. I'm really looking for something that can do good version-ing, branching, archival, etc. with not only source code, but other web assets like art files, movie clips, and even database backups.

We work in a mixed mac/pc environment, so Visual Source Safe or anything purely PC based would be a no go. Any help?

+1  A: 

Take a peek at SourceGear's Vault or TortoiseSVN. Hope that helps.

Bryan Roth
+5  A: 

What makes you think you can't version, branch, archive, etc... graphic files with Subversion?

I've used Subversion for my programs, which include graphics, and it seems to handle them just fine. (Well, diffing is a problem, but I haven't heard of a good image-diffing program.)

bwinton
+5  A: 

You can add any type of file to subversion. If they are binary files, it the saved version is simply a copy whereas text files only differences are saved; however, saving those other types of files in subversion is perfectly fine.

Using shell add-ins (Tortoise on Windows) makes this fairly easy. I have no experience with Mac clients, but I would imagine there are choices out there.

palehorse
A: 

I still use Subversion, and on Windows I use TortoiseSVN which includes the TortoiseIDiff specifically for looking at the diffs between image files.

Wally Lawless
+14  A: 

All the source control systems I've used (CVS, subversion, git) will handle binary files as well as text. If you're working with designers with limited version control experience, right now subversion has a better choice of GUIs. On the PC, there's no substitute for TortoiseSVN, and for the Mac I've heard good things about Versions.

Marcel Levy
Versions (http://versionsapp.com/) is a very good application, however it is still in Beta and features are being added still. This may not go over too well with management types. I have found Versions is better than some alternatives (Zig Version, svnX), I haven't looked at Cornerstone.
Redbeard 0x0A
+2  A: 

The others have pointed out that Subversion and its kin have no trouble dealing with binary files (although not nearly as space-efficiently as text). The database backup requirement is more interesting though, and one that I've come up against more than once.

Ideally, I would want a text representation of the diff between two versions of a database (schema and data). Applying such a diff would take you from one version to the next. The source control engine could just store that with each commit. Rails migrations is a nifty way of handling schema diffs, but I haven't seen anything that can handle full schema and data diffs in a simple text format.

Failing that, I suppose you could check in a text database dump like the type the mysqldump command for MySQL generates. The source control tool's diff algorithm probably won't handle it efficiently, but it's likely to require less space than checking in an opaque binary database file.

yukondude
+1  A: 

I've been using git for several weeks and have become quite fond of it. It's cross-platform, manages conflicts exceptionally well, and gives everyone their own complete version repository so that they can check in changes even when they're not connected to a network.

A lot of high-profile projects are now using git, including Ruby on Rails.

Tim Sullivan
A: 

Subversion has pre-compiled binaries for Mac OS X. It's also available through MacPorts and Fink. There are a couple great interfaces (aside from the command-line). svnX is an open source client that has been around for a while, and as mentioned Versions is very nice looking closed source client that's currently in beta. You should still get familiar with the command-line, as you will run into issues that these GUI clients can't solve.

Subversion handles binary files very well. I've used it for web projects in the past, and successfully versioned image and Flash files with the code that used them.

Sam C
A: 

Mac has something called "Version" that is a subversion UI like "Tortoise SVN" I have found it user friendly and effective.

I work in a Mac/PC environment as well (dang artsy kids) and subversion really is the way to go. I keep all texts, images, queries, and code in there.

My non-techie coworkers found it easy to use once I explained the concept.

Sara Chipps
A: 

I would definitely give subversion another look. I know it may be boring, but reading the SVN Book will help out tons.

I personally use Versions for the Mac. It has a really great UI for interacting with a subversion repo.

What I do is checkout the /Trunk directory of a project in to the site's root. That way I can test and run the working copy as my actual dev setup. Once I am ready to go live I can export the files from the repo sans .svn folders and upload it to a production or staging server. Hope this gives you an idea of what kind of workflow you can have using subversion.

A: 
Brendon
A: 

To use source control with a database, you will probably need to produce a text-based representation of the schema and of the data. You should have this run automatically once a day and commit the changes to your repository.

Note that a DBMS may change the order of rows in a database to make some operations more efficient. This could lead to two dumps looking different without actually having different data. Ensure that whatever creates the dump of your data sorts it by the primary key of each table, and that the set of tables are in a defined order, so that the changes you see when you diff 2 dumps are just the important changes.

Liam
A: 

maybe you are looking for something like continuous integration? you have some resources in the link.

Elzo Valugi