Hi,

Christian Kellermann <[email protected]> writes:
> I recently wanted to implement a ssh remote command so you can
> specify the darcs executable that should get run on the remote end
> of a ssh connection. I discovered that none of the usual network
> options have any effect. The reason for this is the cache implementation
> as it is. It calls copyFileOrUrl with a made up list of DarcsFlags
> [] which in my implementation always resulted in the default "darcs"
> command.
specifically, for Cache handling, I'd tweak the Cache type to hide the relevant
networking options inside. We now have

    newtype Cache = Ca [CacheLoc]

we could as well have

    newtype Cache = Ca [CacheLoc] [DarcsFlag]

or something like that, anyway. But when at it, I'd also like to see the Cache
types refactored, since they are somewhat messy (and the accompanying code as
well). In general, most functions traverse the list of cache locations
manually and to me, that obscures the code quite a bit.

Also, the "source" vs "cache" distinction is quite blurred and might use some
clarification. I suppose that a (source) repository is currently represented as
a read-only cache.

Yours,
   Petr.

PS: Anyhow, a somewhat tangential thought. The "hashed" format, as currently
implemented, actually constitutes a distributed, content-addressed
filesystem. For pristine.hashed, that's actually quite clear, for patches,
"inventories" play the role of directories, in a way. Each "view" into the
filesystem (a branch) fetches missing data on-demand. I don't know much about
distributed filesystem terminology, but your darcs branches are basically
mounts of a remote filesystem, with aggressive caching and possibility to make
local changes. Looking at the problem that way opens up some interesting
alternatives.

--
Peter Rockai | me()mornfall!net | prockai()redhat!com
 http://blog.mornfall.net | http://web.mornfall.net

"In My Egotistical Opinion, most people's C programs should be
 indented six feet downward and covered with dirt."
     -- Blair P. Houghton on the subject of C program indentation
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to