[darcs-devel] [issue1092] cache discoverability

Trent Buck bugs at darcs.net
Tue Sep 23 02:39:28 UTC 2008


New submission from Trent Buck <trentbuck at gmail.com>:

Darcs 2 introduced cache support, so that doing something like "darcs
get http://darcs.net/" repeatedly will be fast:

    http://wiki.darcs.net/DarcsWiki/DarcsTwo#head-0067d46570f52895692323380bf1e4ea5a8bd1da

I'm concerned that normal users -- that is, ones that don't read
release notices or track the darcs mailing list -- are currently
unlikely to discover that this feature exists, and thus get no benefit
from it.

I'm not sure how to go about addressing this.  Currently darcs will
ask for a user name if it needs one and can't find ~/.darcs/author or
_darcs/author.  I guess I'd like something along those lines.

Note that the purpose of this issue isn't to automatically create and
maintain a completely correct ~/.darcs/sources file, but to 1) make
the user aware that the cache feature exists; and 2) give them a basic
setup which will mostly work.

Here's a mockup:

    $ cd /home/twb/Desktop
    $ darcs get http://darcs.net/ darcs

    There are no cache directories configured.  Adding a cache
    directory will make some operations much faster, and can avoid
    unnecessary network traffic.

This interaction would tripped whenever a cache-using command is used,
and there is no ~/.darcs/sources file.  If the user picks "go away, I
want no cache", it would create an empty ~/.darcs/sources, thereby
preventing the question being asked next time.

    Create a darcs cache ~/.darcs/cache? [Y/n]

This just makes the empty directory and adds it to ~/.darcs/sources in
read-write mode.

    Add other users' darcs caches in read-only mode? [Y/n]

This would make a best effort, maybe looking for ~/.darcs/cache for
all users, or entries in ~/.darcs/sources for all users.  It would
obviously ignore any entries that didn't exist or weren't readable.

    To get the full advantages of caching, create a cache on each
    filesystem on which you have darcs repositories.

This part needs rewriting but basically we want users to know that to
leverage hard links, if they're keeping repos in /var/darcs and /var
and /home are seprate filesystems, they need another cache on /var
somewhere.

----------
messages: 6089
nosy: dagit, kowey, simon, twb
status: unread
title: cache discoverability

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1092>
__________________________________


More information about the darcs-devel mailing list