[darcs-users] [patch220] Haddock for Darcs.Repository.Cache.unionRemoteCaches.
kowey at darcs.net
Tue Apr 27 13:21:33 UTC 2010
On Sun, Apr 25, 2010 at 12:08:49 +0000, Dmitry Kurochkin wrote:
> Sun Apr 25 16:05:59 MSD 2010 Dmitry Kurochkin <dmitry.kurochkin at gmail.com>
> * Haddock for Darcs.Repository.Cache.unionRemoteCaches.
Looks good to me.
> +-- | unionRemoteCaches merges caches. It tries to do better than just blindly
> +-- copying remote cache entries:
> +-- * If remote repository is accessed through network, do not copy any cache
> +-- entries from it. Taking local entries does not make sense and using
> +-- network entries can lead to darcs hang when it tries to get to
> +-- unaccessible host.
> +-- * If remote repositoty is local, copy all network cache entries. For local
> +-- cache entries if the cache directory exists and is writable it is added
> +-- as writable cache, if it exists but is not writable it is added as
> +-- read-only cache.
> +-- This approach should save us from bogus cache entries. One case it does not
> +-- work very well is when you fetch from partial repository over network.
> +-- Hopefully this is not a common case.
> unionRemoteCaches :: Cache -> Cache -> String -> IO (Cache)
> unionRemoteCaches local (Ca remote) repourl
> | is_file repourl = do f <- filtered
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: Digital signature
More information about the darcs-users