darcs

Issue 1908 darcs complains if there is no global cache

Title darcs complains if there is no global cache
Priority bug Status resolved
Milestone Resolved in 2.8.0
Superseder Nosy List abuiles, dmitry.kurochkin, kowey, mornfall
Assigned To abuiles
Topics Regression

Created on 2010-08-07.16:39:11 by kowey, last changed 2010-08-08.13:36:59 by mornfall.

Messages
msg12026 (view) Author: kowey Date: 2010-08-07.16:39:10
Hi Adolfo,

One thing I just noticed after applying one of Petr's test patches.  If 
you don't have a global cache directory (as in the case in the 
regression tests), darcs will complain about not being able to reach it.

This sounds like it may be an easy exception to account for.  Could you 
investigate and see what needs to be done?  I think you only need to 
handle the case of the default global cache dir.
msg12027 (view) Author: kowey Date: 2010-08-07.16:39:36
Argh, I meant to say this is a minor regression introduced with your 
issue1599 work
msg12045 (view) Author: mornfall Date: 2010-08-08.12:20:25
This is actually a major regression, since I am seeing this, if the 
global cache does not exist (running cabal test get-http -- you need 
lighttpd for that, and you need to run *only* that -- an earlier test 
would have created the global cache...).

+ darcs get http://localhost:23032/R S
Hash failure in 
http://localhost:23032/R/_darcs/pristine.hashed/87428fc522803d31065e7bce
3cf03fe475096631e5e07bbd7a0fde60c4cf25c7

darcs failed:  Couldn't fetch 
`87428fc522803d31065e7bce3cf03fe475096631e5e07bbd7a0fde60c4cf25c7'
in subdir pristine.hashed from sources:

For all I can tell, this is because the code tries to check cache 
reachability *before* trying to create it, which consequently leads it 
to to forget to write the actual file it intended to write.

Well, seems like an easy fix, submitting now... please review ASAP.
msg12056 (view) Author: mornfall Date: 2010-08-08.13:36:58
The following patch updated issue issue1908 with status=resolved;resolvedin=2.8.0 HEAD

* Resolve issue1908: try to create a global cache before checking its availability. 
Ignore-this: a93e6f5d4a1272fc49341236820a9833
History
Date User Action Args
2010-08-07 16:39:11koweycreate
2010-08-07 16:39:36koweysetmessages: + msg12027
2010-08-08 12:20:26mornfallsetmessages: + msg12045
2010-08-08 13:36:59mornfallsetstatus: needs-reproduction -> resolved
messages: + msg12056
resolvedin: 2.8.0