[darcs-users] About darcs darcs repo as an darcs usage example...

Ian Lynagh igloo at earth.li
Wed Mar 11 21:31:47 UTC 2009


On Wed, Mar 11, 2009 at 01:32:21AM +0100, Petr Rockai wrote:
> 
> PPS: I am fairly inclined to "rebase" gorsvet upon camp-core. I understand
> reasons behind camp-repository's simplicity. However, I believe that it would
> very much make sense for the repository code to be worked on by a different
> person than the core code (while retaining the simplistic repository code for
> core testing).

It would certainly be possible to use a replacement camp-repository
package instead of mine. If I split the repository package into
repository-primary and repository-secondary packages[1] (and perhaps
that would be a good idea anyway) then there might not even be a
significant amount of code duplicated.

Currently you would need to make some changes to camp-bin as well, but
perhaps that just means that the boundary isn't in quite the right
place. For example, the record command does
    directory <- recordDirectory (inRepoPath r pristineDir) "."
to diff pristine and working, whereas that would probably need to be
changed to
    directory <- Repository.record r
or something to handle hashed pristines.

Here are some random numbers, incidentally:

SLOC    Directory       SLOC-by-Language (Sorted)
1532    camp-core       haskell=1532
819     camp-repository haskell=819
473     camp-bin        haskell=473
396     tests           sh=396
309     camp-view       haskell=309
19      camp-network    ansic=17,haskell=2


[1] There's more detail on what primary and secondary means here:
        http://projects.haskell.org/camp/repository
    but essentially, the primary part of a repo is the bit you need to
    understand about a remote repo, while you also need to understand
    the secondary part of a local repo. Hashed pristine would be a grey
    area, I guess; you don't strictly need to understand them to get a
    remote repo, but it's beneficial if you do.


Thanks
Ian



More information about the darcs-users mailing list