[darcs-users] Cheap branches (was: Re: post-1.0: "isolated directories"?)

Anthony Towns aj at azure.humbug.org.au
Thu Oct 14 06:52:36 UTC 2004


On Wed, Oct 13, 2004 at 04:56:22PM +1000, Anthony Towns wrote:
> On Tue, Oct 12, 2004 at 09:06:46PM +0200, Juliusz Chroboczek wrote:
> > I'm currently more interested in implementing cheap branches [...]
> I've been hax0ring on cheap branches too, though completely as a
> server-side thing, not touching darcs itself at all. Hopefully it'll be
> presentable RSN.

So, I got a little bit more done on this last night, so that I can
basically say:

	darcs push darcs-repo:azure.humbug.org.au/darcs-repo/experimental

to commit to the "experimental" branch of the "darcs-repo" project;
and have patches between branches within the same project be shared (if
they differ slightly, it's stored as the original patch plus a diff) [0].

I also wrote a CGI script that lets me say

	darcs get http://azure/cgi-bin/darcs-repo.cgi/darcs-repo/experimental

darcs pull obviously works too. It does require setting DARCS_SSH and
DARCS_SCP to some wrapper scripts that catch a host name of "darcs-repo",
but otherwise no changes to darcs itself is required. Oh, "localhost"
as the host name stops it from ssh'ing.

Other notes: this explicitly doesn't require darcs (or haskell) on the
server -- the scripts are all perl and bash. It doesn't support merging;
you have to do that on the client side before pushing. It doesn't support
unrecording or unpulling from the repository either -- once you've put
it in, you're not meant to take it out.

I blogged more details at: http://azure.humbug.org.au/~aj/blog/2004/10/14
There's a tarball up at: http://azure.humbug.org.au/~aj/darcs-repo/

It's more of a proof of concept at the moment, so while it works, it's
not necessarily secure, and won't work properly with some darcs features.

Any comments?

Cheers,
aj

[0] The repo structure looks like:

	/srv/darcs-repo/
		{project name}/
			inventory-{branch name}
			patches/
				{original patch name (uncompressed)}
				{original patch name (uncompressed)}.{branch}

-- 
Anthony Towns <aj at humbug.org.au> <http://azure.humbug.org.au/~aj/>
Don't assume I speak for anyone but myself. GPG signed mail preferred.

``[S]exual orgies eliminate social tensions and ought to be encouraged.''
      -- US Supreme Court Justice Antonin Scalia (http://tinyurl.com/3kwod)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20041014/fdba6077/attachment.pgp 


More information about the darcs-users mailing list