This patch rearranges functions of Darcs.Repository as follows:
if remote is old-fashioned
then fetch it in a specific way
else
if remote has up-to-date packs
then fetch basic repo with pack (*)
else fetch basic repo normally
if not lazy cloning
then
if remote has packs
then fetch complete repo with pack
ele fetch complete repo normally
Tests pass and some real-world examples I've tried also. I'm waiting
until tomorrow before screening it in case someone realizes this is
wrong.
I guess we could change (*) in the future so that cloning the basic remote
repo with packs be done without any patch application, but by fetching
both pack and pristine files in parallel.
1 patch for repository http://darcs.net:
Fri Apr 18 17:46:21 ART 2014 Guillaume Hoffmann <guillaumh@gmail.com>
* resolve issue2379: only use packs to copy pristine when up-to-date
When creating packs, save pristine hash to _darcs/packs/pristine
If basic pack is outdated, do not fetch it, but fetch patches pack
anyway.
In Darcs.Repository, separate functions between the ones that fetch
basic repository and complete repository (packed or not), and
separate function that clones old-fashioned repositories.
Attachments
|