Saturday, April 30, 2005

darcs rocks

I've been experimenting with darcs since Titus mentioned it at the last SoCal Piggies meeting, and my conclusion is that it's the best revision control tool I've seen, for personal-scale projects. I haven't really stress-tested it for project size scalability yet, so that's where the possible caveat lies. I've heard that it couldn't handle the Linux kernel... but then, not many things can.

If you don't already use a revision control tool, or if you're not quite happy with the one you've got, give darcs a shot.


Blogger Grig Gheorghiu said...

Could you post a 5-minute guide of installing darcs, creating a repository and checking out/checking in files?


2:31 PM  
Blogger Daniel Arbuckle said...

Installing depends on your platform. On my Gentoo Linux box, it was a matter of typing 'emerge darcs' and waiting for a while.

On Windows, I downloaded a binary, plus followed a few simple instructions to enable ssh for repository access.

There are good instructions for downloading and installing on many systems.

Once you have darcs installed, you'll want to set up a repository. You do that by going to the root of the respository-to-be's directory tree and typing 'darcs initialize'

Then you 'darcs add' any files that you want to be version controlled

Once all the files are in place and added, execute 'darcs record' and you're setting up

To get a local copy of a darcs repository, run 'darcs get LOCATION' where LOCATION is a URL, a filesystem path, or an ssh remote path

After you've changed some things, you run 'darcs record' again to store those changes in revision control.

Finally, to update repository A with the changes made to repository B, you can use 'darcs push A_LOCATION' from within B, or 'darcs pull B_LOCATION' from within A

5:39 PM  
Blogger Daniel Arbuckle said...

This comment has been removed by a blog administrator.

5:50 PM  
Blogger Daniel Arbuckle said...

The workflow with darcs follows this pattern when you're working in a group:

1) get local copy of repository
2) make changes
3) locally record changes
4) usually goto 2
5) send changes to remote repository
6) goto 2

When you're working alone, you just create a repository and then record your changes whenever you feel that it's appropriate.

5:55 PM  
Blogger Daniel Arbuckle said...

Oh yeah, when you're working with others, its sometimes useful to pull their changes into your repository, too :)

5:58 PM  

Post a Comment

<< Home