>> You don't _need_ darcs running on your server at all.  Set up sshd to
>> run on the server, and use
>>
>>            darcs push [EMAIL PROTECTED]:/var/share/www/darcs-repo
>>
>> or similar to push from your local repo via SSH.

> Err, according to the manual you do need darcs on the other end when
> using push.

Correct.  Darcs push is basically

  darcs send -o - [EMAIL PROTECTED]:dir | ssh [EMAIL PROTECTED] 'cd dir; darcs 
apply'

It would be in principle possible to avoid this requirement.  But that
would be a new command althegither, ``darcs excruciatinglyslowpush''.

OTOH, a workaround exists.  It is dangerous, as it doesn't properly
protect against multiple simultaneous access to the server.

To avoid having Darcs on your publicly-visible server (particularly if
you use a cheap provider with no shell access), set up a local
``public'' repository where you push to.  Then, simply mirror this
local repository on the web server.

So instead of pushing remotely, you'd do something like

  $ darcs push /var/repos/published-repo
  $ rsync -a --delay-updates /var/repos/published-repo [EMAIL PROTECTED]:dir

Let me clarify the risks of this method.  First, if somebody else is
writing to the remote repository at the same time as you; in that
case, rsync will happily corrupt the remote repository, with no
indication that it has done so.

If somebody is pulling from the remote directory at the time you do
the transfer, he might get a failure, as the files are not necessarily
written in the right order.  However, unless the server is very slow,
the ``--delay-updates'' flag to rsync makes the vulnerability window
so small as to probably be negligible; other upload protocols are more
vulnerable.

Finally, if /var/repos/published-repo is not a subset of the remote
repository, rsync will happily undo any changes in the remote that are
not in /var/repos/published-repo.

In any case, this technique is offered with no warranty, not even of
any kind.

                                        Juliusz

_______________________________________________
darcs-users mailing list
[email protected]
http://www.abridgegame.org/mailman/listinfo/darcs-users

Reply via email to