On Thu, Nov 17, 2005 at 09:00:49AM +0100, Tomasz Zielonka wrote:
> On Tue, Nov 15, 2005 at 08:36:32AM -0500, David Roundy wrote:
> > It would be nice to make it just require one connection, since then we
> > wouldn't have to tell people to use ssh-agent.
> 
> Also, I am not sure sftp does any pipelining? I guess it does in the
> batch mode.

sftp can read commands from stdin, so I think you could just open up a pipe
to sftp.  This might be easily and portably doable with the new
System.Process library....

> I thought about creating a simple darcs-server. It would be an
> additional (perhaps hidden) darcs command, that would make darcs
> respond to requests on stdin/stdout. One kind of request would
> be to get a list of files, the other would be to invoke a darcs
> command.

One major downside of this approach is that it requires darcs on the other
side.  It'd be nice to not require darcs for ssh pull, send and get.
Indeed, if we move to support pristine-cacheless, working-directoryless
repositories, it might even be nice to support (optionally) a push that
doesn't require darcs on the other side... although getting locking right
over sftp would be awfully tricky.

Actually, an interesting approach might be to implement a ReadableDirectory
monad for an sftp connection, and then perhaps to try implementing a
WriteableDirectory monad.

> The other approach, which could remove this problem, is to write a shell
> script that would be sent to the other side of ssh connection and
> executed there. This is an idea taken from shfs.

This is scary in terms of portability--keep in mind that it may be Windows
on the other side of the ssh connection.
-- 
David Roundy
http://www.darcs.net

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

Reply via email to