[darcs-users] Mirroring repos to a web host (was: Using darcs in the real world)

David Roundy droundy at abridgegame.org
Tue Nov 25 12:58:32 UTC 2003

On Mon, Nov 24, 2003 at 09:12:41AM -0800, Kevin Smith wrote:
> Gour wrote:
> >Can you suggest some tool for mirroring?
> >
> >I'd like to be able to mirror my localhost repos to web-hosted site.
> At first, I was just using ftp to send the whole project directory up. 
> As the project got bigger, that started taking too long. So in my case, 
> I switched to using rsync. If your web host supports it, it does a great 
> job of only sending deltas, and it's easy to have rsync ignore files 
> (like .o and .so for example).
> The other option I thought of would be to only upload the
> _darcs/inventory file, and the _darcs/inventories and _darcs/patches
> directories. A darcs get shouldn't require the workspace or current
> directories. Since files in patches are never modified after they are
> written(?), you would only have to upload new patches, so it would be
> very fast.

If you have shell access on the web-hosted site, using darcs push (possibly
--and-apply via scp/ssh) is a nice efficent way to get update the mirror
with reasonably little bandwidth used.  Or pull would work equally well, if
your development machine can be accessed via ssh.  When using ssh, I assume
you use an ssh-agent.  Otherwise, of course, it would be a pain to have to
type your passphrase again and again.

But yes, the working directory and current are unnecesary, unless you want
to actually use the repository.  However, if you were to run the cgi script
to allow browsing of the repository, you'd want current (in principle,
assuming a sufficiently smart cgi script) so you wouldn't have to read the
entire repository every time you want to know the contents of a file.

> Unfortunately, at the moment darcs get seems to fail if there is no
> current directory in the repo you are grabbing. It would be nice if this
> would work.

That's odd.  Are you running get on the server itself, or remotely? If you
run get on a local filesystem, it does require that _darcs/current exist,
because it tries to copy current over directly (which is much faster than
applying all the patches on an empty directory), but when running get
remotely, I don't think there should be a problem.
David Roundy

More information about the darcs-users mailing list