[darcs-users] Re: playing nice with others

Andrew Pimlott andrew at pimlott.net
Fri May 21 13:51:20 UTC 2004


On Fri, May 21, 2004 at 09:34:36AM -0400, Andrew Pimlott wrote:
> One thing darcs probably can't do now (but rsync can) is using ssh and
> public keys (one per developer) that can only update a darcs repository.
> The trick here is that darcs can only run a single, pre-determined
> command line on the remote machine.  Currenly, darcs uses multiple ssh
> connections and scp for a push, so this would need to be combined into
> one ssh connection and a protocol would need to be created for
> transfering the required data.

To be more precise, multiple ssh connections are fine, the only change
is that they all need to run the same command.  A trivial protocol would
be to send as the first line of this connection the darcs subcommand to
run.  So for a pull, which requires (at least) an scp and an apply,
darcs could do something like

    ssh remote darcs server /path/to/repo
    inventory
    <receive file>

    ssh remote darcs server /path/to/repo
    apply
    <send patches>

server is a new darcs subcommand which takes the repository on which to
operate as an argument, and the real subcommand to run as the first line
(of course, it should be careful to only affect the repository given as
an argument).  inventory of course returns the inventory (probably it
could be a pseudo-subcommand instead of a real one).

Then, the repository owner could add a ssh authorized key with command
"darcs server /path/to/repo".

Andrew




More information about the darcs-users mailing list