Painless Version Control?
December 21, 2005 4:09 AM   Subscribe

I'm a graduate student in computer science. It's often that I wish I had some form of painless version control for all the code and papers I produce. What should I use version control? How? Solutions need to be cross-platform and integration with Emacs is a big plus.

I've used CVS once or twice both from the command line and from within Eclipse, but I take it there are better things out there? SVN? What about something patch based like darcs or arch, these look interesting to me, are they really better?

Are there any setups that work somewhat well with binar files (more and more of my writing is in LaTeX, but I still have word stuff floating around).

I'm using Windows XP, OS X and Linux, so I'd need clients for each platform. The server should at least run on Linux.

Most of all, the process of committing and checking out needs to be painless, if I can integrate it into my emacs workflow that's all the better. Also, ease of branching would be a big plus (as I understand it, branching would let me try completly different paths and then drop back in parts that seem fruitful).

Anyone in a situation similar to mine? What are you doing? What else should I be looking out for?
posted by mge to Technology (20 answers total) 1 user marked this as a favorite
 
Emacs has had integration with CVS for quite a long time: VC. There's also xtla for working with arch.
posted by letourneau at 4:25 AM on December 21, 2005


i use cvs. a whole pile of other people laugh at me, because when they use cvs they lose data, and they think subversion is cool. but i've used cvs for years, it runs on every platform under the sun, it only loses data when the user screws up, i understand how it works and can hack cvsroot by hand, and i keep hearing of stories of subversion crashing.
posted by andrew cooke at 4:26 AM on December 21, 2005


I dig subversion.... but I haven't used CVS enough to know exactly how it compares. The SVN integration with Apache is nice and the setup isn't too evil... but yeah, every once in a blue moon, I've gotta reboot the apache server to free up subversion.

'Course, there's a whole variety of svn clients out there... there's even a really nice integration right into windows xp, if you're looking for that kind of thing.

Now, I'm hardly the master of version control -- I use it more for coordinating multiple developers on my crew than for handling branches and whatnot.
posted by ph00dz at 4:59 AM on December 21, 2005


I use CVS at work, and SVN when i'm at home. They are very similar. I notice a few things on the client side that are nicer with SVN, but I have been told that on the whole SVN is a better system. For your needs, either is probably fine.

Both systems work with Binary files, though you won't be able to see differences between versions.

Branching in CVS is easy. I haven't done so in SVN before, but I imagine it works much the same way.

Finally I am quite sure both integrate with Emacs. If you are in Windows XP, you can also get Tortise CVS and Tortise SVN, which integrate with the Windows XP file system.
posted by chunking express at 6:35 AM on December 21, 2005


Subversion's main advantage over CVS is that you can rename and move files, and still keep the version history.
posted by jon_kill at 6:36 AM on December 21, 2005


If it's just you working on the code, stick to CVS, which has more mature GUIs and tools to work with (and probably better Emacs integration, although I don't use Emacs so I don't know).
If there are multiple developers, Subversion will probably be a better option.

For the documentation/papers I'd use MediaWiki, which keeps all revisions painlessly. See this recent related thread.
posted by Sharcho at 6:42 AM on December 21, 2005


On second thought, Subversion will probably be a better choice.
posted by Sharcho at 6:49 AM on December 21, 2005


SVN works quite well, and has an excellent eclipse plugin. there are SVN modes for emacs, but i haven't used them.
posted by paradroid at 7:37 AM on December 21, 2005


Go download TortoiseSVN, it allows you to create a svn repository and then perform version control with the Windows file system. There is TortoiseCVS too - but as mentioned - Subversion allows you to move and copy directories easily while CVS doesn't. That feature alone is worth using SVN over CVS. Also change sets are atomic (so instead of each file having a unique version number, every change you make to the repository as a whole shares a version number)
posted by schwa at 7:53 AM on December 21, 2005


Oh - TortoiseSVN is for XP. There is no good SVN client (apart from the commandline) for OSX. Not sure about Linux.
posted by schwa at 7:58 AM on December 21, 2005


Subversion is much better than CVS, and I've used both extensively. Even just for the aforementioned copy/move/rename ease-of-use, it's a huge winner.

There aren't any great clients for OSX, no, but for 99% of usages, the command line really is pretty simple to use. Plus most editors have Subversion plugins these days (TextMate, for example; pretty sure Eclipse does; JEdit probably does; etc).
posted by cyrusdogstar at 8:07 AM on December 21, 2005


I use subversion and yes, there is an emacs svn plugin. The ability to move files was a major positive for me. It also seems to do a better job with native binaries than cvs in my experience. I've been working on my doctoral research and just about everything else in there for about two years now.

For OSX, I'm fond of svnX.
posted by KirkJobSluder at 8:22 AM on December 21, 2005


Second cyrusdogstar. I've used both, on real paying projects, and Subversion is better.
posted by orthogonality at 8:30 AM on December 21, 2005


I really like using SVN on a server someplace (in my case, at my colocated box), and using svk to pull down the repository to whatever local box I am using at the moment.

This has the nice side effect of letting me work on files in version control while I'm not connected to the internet, and just push my changes up when I'm connected later.
posted by AaronRaphael at 9:01 AM on December 21, 2005


Branching in CVS may be easy if your project is trivial in size, but it is completely pathetic for anything large. One of the main reasons that the gcc project recently switched from CVS to Subversion was that just creating a branch with CVS would take several hours, and lock the whole repository from any other actions for the entire time.

The other great win of Subversion (already mentioned above) is being able to move and rename files and maintain metadata. With CVS you really can't do this easily. Either you lose the change history of the file under its old name/location, and treat the newly renamed as a completely new file -- or you go into the repo and manually edit control files, and lose the existence of the file in its old name/location.

CVS *can* handle binary files but it does a very poor job with them. You essentially store an entire copy of the file for any revision/branch, so it's ridiculously inefficient. Subversion handles this in the sensible manner, though.

The major disadvantage of Subversion is that it maintains the repository as a massive opaque binary database file. You can of course dump this into a text format for backup/manipulation purposes, but the native format is something that you can't do anything by hand with -- kind of like the windows registry. Whereas with CVS, your repository is stored as individual plain text files that you can manipulate easily. Some people are quite put off by this, they like the safety of always being able to just cd into the repo and look around if all else fails.

Subversion is also newer so the range and breadth of client / editor integration will be much smaller. But, there are clients for all major operating systems and you should be fine either way if you're using emacs.
posted by Rhomboid at 10:52 AM on December 21, 2005


Whatever, for the kinds of things you're doing they'll all work fine. Just use something.
posted by aubilenon at 11:01 AM on December 21, 2005


Wait, Rhomboid--are you referring to the old-style BDB-based repositories? The default ever since 1.1 (at least) has been the FSFS style, which as far as I know does store everything on the filesystem and is a bit easier to tweak by hand.
posted by cyrusdogstar at 11:25 AM on December 21, 2005


Check out this article on keeping one's home directory in SVN. Check out the link at the bottom, too. You may not want to go completely hardcore and revision-control everything, but those articles will give you excellent insight into how to use version control for your important data. From this previous thread.
posted by breath at 1:12 PM on December 21, 2005


Try darcs. CVS and SVN aren't powerful enough, and arch is too complicated. There are several Emacs tools for using darcs.
posted by bpt at 1:28 PM on December 21, 2005


In Word, on the File menu, click Versions and select the Automatically save a version on close check box.
posted by KRS at 1:57 PM on December 21, 2005


« Older Can anyone identify this song from the movie...   |   Build a web bot? Newer »
This thread is closed to new comments.