darcs

Patch 1324 correctly take advantage of read-only cache locations

Title correctly take advantage of read-only cache locations
Superseder Nosy List gh
Related Issues
Status accepted Assigned To
Milestone 2.10.0

Created on 2015-04-06.22:06:07 by gh, last changed 2015-04-13.18:41:04 by gh.

Files
File name Status Uploaded Type Edit Remove
correctly-take-advantage-of-read_only-cache-locations.dpatch gh, 2015-04-06.22:06:07 application/x-darcs-patch
patch-preview.txt gh, 2015-04-06.22:06:07 text/x-darcs-patch
unnamed gh, 2015-04-06.22:06:07
See mailing list archives for discussion on individual patches.
Messages
msg18357 (view) Author: gh Date: 2015-04-06.22:06:07
Since we changed the global cache location to ~/.cache/darcs/
and automatically consider ~/.darcs/cache as read-only (on linux
machines at least), we never really took advantage of the old,
read-only path.

This is because in the function copyFileUsingCache, we considered
~/.darcs/cache as a bucketed source (we used hashedFilePath instead
of hashedFilePathReadOnly). Also, copying some hashed file with
copyFileUsingCache always failed because after reading (and not
finding the file) in ~/.darcs/cache (which is the first read-only
location is the list of locations that the function usually gets),
we just terminate without scanning other read-only locations
(typically, the source repository location).

This patch fixes these two problems.

1 patch for repository http://darcs.net:

patch 4935db39c767f4bad771442fbe14a24601360b75
Author: Guillaume Hoffmann <guillaumh@gmail.com>
Date:   Mon Apr  6 19:00:09 ART 2015
  * correctly take advantage of read-only cache locations
Attachments
msg18365 (view) Author: gh Date: 2015-04-13.18:41:04
Self-accept (in 2.10 too).
History
Date User Action Args
2015-04-06 22:06:07ghcreate
2015-04-06 22:06:53ghsetstatus: needs-screening -> needs-review
milestone: 2.10.0
2015-04-13 18:41:04ghsetstatus: needs-review -> accepted
messages: + msg18365