On Tue, Nov 15, 2005 at 02:07:23PM +0100, Tomasz Zielonka wrote:
> On Tue, Nov 15, 2005 at 07:59:53AM -0500, David Roundy wrote:
> > On Tue, Nov 15, 2005 at 01:22:25AM +0100, Ketil Malde wrote:
> > > darcs get to a directory on a different volume should do it, I think.
> > > Or to a file system that doesn't support hard links.
> >
> > Or (to be really inefficiently stupid about this)
> >
> > darcs get localhost:oldrepo newrepo
>
> BTW, was there some improvement in efficiency of using darcs over SSH?
> For example, it would be nice if darcs required only one ssh connection
> per operation. Would this be a good task for someone wanting to get back
> on track with darcs development?
Recently, I think the only speedup was in the apply function (which does
help). A while back someone (Benedikt maybe?) implemented sftp support,
which cuts down the number of ssh connections needed to be O(1). It would
be nice to make it just require one connection, since then we wouldn't have
to tell people to use ssh-agent. I think it would be a bit tricky, but
you're right, it'd be a good task for someone wanting to get back on track
with darcs development--especially someone like you who's got plenty of
haskell know-how... :)
I'm not sure where we'd want to stick the (reused) ssh connection (or sftp
connection). It'd be tempting to stick it in the Repository, but that
could be viewed as an abuse of that structure (in which case I'd hope
Juliusz would tell me...). One could also store a cache of connections,
but that seems ugly and error-prone. I actually like the idea of sticking
the connection in Repository, but it makes me wonder if we actually ought
to be sticking a set of retrieval functions in the Repository.
Perhaps something like:
data Repository = Repo {repo_ name :: !String,
repo_format :: !RepoFormat,
repo_type :: !RepoType,
is_local :: Bool,
fetch_datafile :: (String -> IO PackedString),
fetch_prefsfile :: (String -> IO PackedString)
}
This way we'd be able to code in new persistent connections without
modifying any of the "client" code, and the "connection" would be held in
place transparently by the fetch_prefsfile and fetch_datafile functions, as
long as the repo is accessible (with some sort of finalizer closing the
connection when the Repository is garbage-collected).
--
David Roundy
http://www.darcs.net
_______________________________________________
darcs-users mailing list
[email protected]
http://www.abridgegame.org/mailman/listinfo/darcs-users