[darcs-users] Re: playing nice with others

David Roundy droundy at abridgegame.org
Mon May 24 10:04:10 UTC 2004


On Fri, May 21, 2004 at 09:51:20AM -0400, Andrew Pimlott wrote:
> 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".

Hmmmm.  Another possibility would be to support somehow two protocols--one
for reading and one for applying, since

darcs push foo at foobar.com:foo

only *needs* to use scp for reading, not for riding so a command like

darcs push foo at foobar.com:foo a.k.a. http://foobar.com/repos/foo

(no, I'm not seriously suggesting that interface) would only run one
command, which would be darcs apply.  Perhaps the interface should me more
like

darcs push --to-ssh foo at foobar.com:foo http://foobar.com/repos/foo

or even

darcs push --to-ssh foo at foobar.com:foo droundy at foobar.com:/home/foo/foo

Of course, this wouldn't address the situation where the repository *isn't*
available except via the non-login account, but I'm not sure that's a
situation that ever occurs in practice.
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list