[darcs-users] [patch335] Resolve issue1908: try to create a global cache before...

Eric Kow kowey at darcs.net
Sun Aug 8 12:37:49 UTC 2010


On Sun, Aug 08, 2010 at 12:22:34 +0000, Petr Ročkai wrote:
> Sun Aug  8 14:24:19 CEST 2010  Petr Rockai <me at mornfall.net>
>   * Resolve issue1908: try to create a global cache before checking its availability.

What about users that don't want a global cache?

Looks like our user documentation is lacking: How do users disable the
global cache if they don't want it?  I'm guessing they would have to
make sure ~/.darcs/sources is empty (well, that it excludes the global
cache entry).

If so, would this mechanism support this?  I'm guessing it does because
we only attempt to create the cache if it's in the sources.

Also, does createCache deal correctly with cache entries that are explicitly
marked readonly (in darcs sources, not in the filesystem mind you)?  Or is
that such a corner case that we shouldn't worry about it.

-                                 do
-                                   checkCacheReachability (show e) c
-                                   (fname,x) <- filterBadSources cs >>= ffuc
-                                   do createCache c subdir
-                                      createLink fname (fn c)
-                                      return (fn c, x)
-                                    `catchall`
+                                 do createCache c subdir `catchall` return () -- don't worry
+                                    checkCacheReachability (show e) c
+                                    (fname,x) <- filterBadSources cs >>= ffuc
+                                    do createLink fname (fn c)
+                                       return (fn c, x)
+                                     `catchall`

This looks like it just added the createCache, which seems fine if my questions
above are fine.

Same request to Adolfo: please produce minimal patches to ensure fast review.

Also, the comment could probably say something more useful than "don't worry"
perhaps explaining why we try to create the cache (it may be missing) and why
it's no big deal if it fails

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, please try +44 (0)1273 64 2905.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20100808/a9560365/attachment.pgp>


More information about the darcs-users mailing list