[Haskell-cafe] A small Darcs anomoly

Malcolm Wallace malcolm.wallace at me.com
Tue Apr 26 13:17:17 CEST 2011


On 25 Apr 2011, at 11:13, Andrew Coppin wrote:

> On 24/04/2011 06:33 PM, Jason Dagit wrote:
>> 
>> This is because of a deliberate choice that was made by David Roundy.
>> In darcs, you never have multiple branches within a single darcs
>> repository directory tree.
> 
> Yes, this seems clear. I'm just wondering whether or not it's the best design choice.

It seems to me to be a considerable insight.  Branches and repositories are the same thing.  There is no need for two separate concepts.  The main reason other VCSes have two concepts is because one of them is often more efficiently implemented (internally) than the other.  But that's silly - how much better to abstract over the mental clutter, and let the implementation decide how its internals look!

So in darcs, two repositories on the same machine share the same files (like a branch), but if they are on different machines, they have separate copies of the files.  The difference is a detail that you really don't need to know or care about.

> It does mean that you duplicate information. You have [nearly] the same set of patches stored twice,

No, if on the same machine, the patches only appear once, it is just the index that duplicates some information (I think).  In fact just as if it were a branch in another VCS.

Regards,
    Malcolm



More information about the Haskell-Cafe mailing list