[darcs-devel] darcs patch: add support for partial and lazy
downloa... (and 4 more)
David Roundy
droundy at darcs.net
Sat Apr 14 21:33:34 PDT 2007
Hi all,
This is my latest take on --lazy repositories. It includes an amend-record
of one of my earlier patches to just fix a conflict in the makefile, so if
you've applied the eariler patches, be careful.
This is very different, based on the feedback I got. Lazy repositories no
longer create files for all the patches that behave like symlinks.
Instead, the file _darcs/prefs/sources is created, with a link to the
original repository. There's also a new flag --emphemeral, which tells
darcs explicitely not to save any of the patch files, even if it is lazy.
Which makes for several permutations, as --partial is now distinct from the
other two.
So far, I've only added --ephemeral and --lazy to get, but --ephemeral
would be also be meaningful for pull and push (and would be trivial to add,
but I thought I'd wait on feedback), and might make sense if either
bandwidth is really cheap, or disk space is very expensive. Of course,
--ephemeral means that your repository doesn't actually store any of the
information, so it's rather risky, but that's that.
Another feature that's added is support (completely untested!) for "cache"
directories. If you add to ~/.darcs/sources (or your local
_darcs/prefs/sources) a line like "cache:/home/droundy/.darcs/cache", then
that directory will be searched for patches before they are downloaded
remotely, and patches will be stored there after they are downloaded
remotely. I haven't implemented the logic to use hard links to avoid
duplicate copies being stored in the repository and the cache. This could
be a scenario where you'd consider using ephemeral repositories, but hard
links would be better, if you're on a posix system.
We also support read-only caches with "readonly:/home/igloo/.darcs/cache",
which darcs won't try to write patches to, which could be helpful for
saving bandwidth by peeking at a fellow user's cache. You can also, of
course, use other repositories as read-only caches, but with a "repo:" line
(since darcs needs to know to look in the subdirectories _darcs/inventories
and _darcs/patches).
I think this addresses most of the concerns people have expressed. The
naming is still a bit haphazard, but the functionality is looking pretty
good to me, and the code has actually simplified a bit (after getting more
complicated).
I guess this is about all. I look forward to comments and testing (but
especially to testing!).
David
Sat Apr 14 10:15:03 PDT 2007 David Roundy <droundy at darcs.net>
* add support for partial and lazy downloading of hashed repos.
Sat Apr 14 10:49:33 PDT 2007 David Roundy <droundy at darcs.net>
* remove unused export from RepoFormat.
Sat Apr 14 14:23:01 PDT 2007 David Roundy <droundy at darcs.net>
* rewrite lazy code to handle configured set of URLs for patch origins.
Sat Apr 14 15:42:28 PDT 2007 David Roundy <droundy at darcs.net>
* make lazy repos cache patches downloaded.
Sat Apr 14 16:40:34 PDT 2007 David Roundy <droundy at darcs.net>
* add --ephemeral option to refuse to download patches altogether.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 111635 bytes
Desc: A darcs patch for your repository!
Url : http://lists.osuosl.org/pipermail/darcs-devel/attachments/20070414/5ad6d8fa/attachment-0001.bin
More information about the darcs-devel
mailing list