[darcs-users] [BUG] darcs push --dry-run fails

David Roundy droundy at abridgegame.org
Thu Jul 1 17:01:35 UTC 2004

On Wed, Jun 30, 2004 at 10:14:11AM -0700, David Brown wrote:
> On Wed, Jun 30, 2004 at 01:49:03PM +0200, Peter Firefly Lund wrote:
> > running darcs on the remote side with ssh is currently quite wasteful.
> A possible way to improve this would be to have some type of darcs
> server (run through ssh, just using stdin and stdout), that would allow
> multiple operations to happen.  This would probably speed many things up
> by only requiring one ssh connection.  (It would also make ssh useable,
> even without an agent, since the password would only have to be typed
> once).

Mostly this doesn't require a special server on the other side, sftp could
be used to allow many files to be transported over one ssh connection.
This definitely would be great, but either requires a global variable be
stored to keep track of the connection, or that we change the internals of
how we get files to pass around a "connection" data structure of some
sort.  Of course, it also requires that someone figure out how to code with

But we could define a connection type something like:

type RepositoryConnection = RepositoryConnection {
  readFilePS :: FilePath -> IO PackedString,
  copyFileHere :: FilePath -> IO ()

then a

connectToUrl :: String -> IO RepositoryConnection

then replace all the fetchFilePS etc with connections to a URL... obviously
we'd have to keep passing this thing around, but that wouldn't be too
hard.  The tedious part would be changing all the accesses, but if you
removed the existing fetchFile and copyUrl functions, you'd at least be
sure not to miss anything.
David Roundy

More information about the darcs-users mailing list