Spontaneous Branches
Darcs has a highly useful feature which is worth a name "spontaneous branches".
Branches are a metaphor in source control management that allow you to work on a particular task or line of development, and often merge the changes back.
I say that darcs allows you to have spontaneous branches because often, truly no additional effort is required.
I'll explain with an example. Let's say I'm working on a task that has a ticket in a bug tracking system, with a ticket number of '123'. I need to make 3 separate but related patches to resolve this ticket. I name my 'records' for those patches like this:
RT#123 Update Documentation RT#123 Fix bug RT#123 Really fix bug
The consistent and unique names here allow this set of patches to be a spontaneous branch. darcs has lots of options for working with this spontaneous branch very easily:
# Merge the branch into a central repo: $ darcs push -p 'RT#123' # launch just this branch into the production copy $ darcs pull -p 'RT#123' # mail this branch to remote repo $ darcs send -p 'RT#123' # Review which patches are in this branch $ darcs changes -p 'RT#123'
This is an extremely easy to use and powerful feature which is especially helpful when the order you need to deliver changes is not the order in which you are able to start on them.
Notice that the branch name here is something I made up, something which ties together darcs with a larger project management scheme. Keeping track of a bug tracking ticket number is enough brain effort. I don't need to be thinking about another set of revisions in my source control system as well.
Spontaneous branches are not a substitute for formal longer term branches, although those are also easy in darcs.
Still, spontaneous branches are perfect for small to mid-size groups of patches that need to be handled together.
It's a powerful concept that merits consideration when comparing version control systems.
See Also
Preparation Branches are another elegant way darcs improves code development workflow.
