[darcs-devel] [issue2372] Please remove "HINT: I could not reach..." message
Ben Franksen
ben.franksen at online.de
Tue Jun 30 01:02:05 UTC 2015
Ben Franksen wrote:
> Keep tuned...
s/Keep/Stay/
Lack of sleep.
> Cheers
> Ben
>
> Ben Franksen wrote:
>> Ganesh Sittampalam wrote:
>>
>>> On 07/03/2015 17:07, Ben Franksen wrote:
>>>
>>>> (1) Stop accessing ~/.darcs/cache unconditionally. Instead,
>>>> automatically create ~/.darcs/sources (if and only if it does not yet
>>>> exist), with ~/.darcs/cache as the single (default) entry. We can do
>>>> this every time Darcs is invoked or just before it starts reading patch
>>>> files.
>>>
>>> I like this idea.
>>>
>>>> (2) Similarly, for each repo create _darcs/prefs/sources that by
>>>> default is a copy of ~/.darcs/sources. Again, do this only if no such
>>>> file exists (i.e. *not* if it exists and is empty).
>>>
>>> What's the advantage of copying it rather than falling through to it? I
>>> guess it means that you can stop entries in the global sources being
>>> used, but that strikes me as quite a rare/unlikely case.
>>
>> Yes, that's better. It means we keep global and local sources separate:
>> the global one for global caches, the local one (only) for related repos.
>> This means there is no longer any need to manually modify a local sources
>> file, which is a good thing.
>>
>>> Conversely, if we fall through then it's easier for people to add/remove
>>> global sources without touching every repository.
>>
>> Right. BTW, I didn't mention it but of course Darcs should always
>> consider the global *and* local sources files. (I think this is how
>> things are currently.)
>>
>>>> (3) Whenever an entry in _darcs/prefs/sources or ~/.darcs/sources is
>>>> inaccessible, it gets removed (permanently) from both files.
>>>
>>> Would the user be told, so they could re-add it in the case of a problem
>>> they knew to be transient?
>>
>> Yes, for the global sources file a one line notification a la
>>
>> Removing inaccessible /path/to/cache from ~/.darcs/sources.
>>
>> would be nice. Or perhaps the line should just be disabled (with a
>> comment marker or some such), and the message changed to
>>
>> Disabling inaccessible /path/to/cache in ~/.darcs/sources.
>>
>> making it easier to re-enable it. BTW, if editing the file fails for some
>> reason, we should just change the message to
>>
>> Not disabling inaccessible /path/to/cache in ~/.darcs/sources
>> (<reason>).
>>
>>
>> OTOH, the local sources file is dynamically modified almost every time we
>> interact with another branch/repo, so it wouldn't make much sense to
>> issue a message.
>>
>>>> (4) New entries are auto-added to _darcs/prefs/sources as before i.e.
>>>> whenever we are told to fetch something from a specified repo.
>>>
>>> Makes sense.
>>>
>>>> This allows users to reset the caching behaviour of a repo to defaults
>>>> by simply removing _darcs/prefs/sources. In the same way, removing
>>>> ~/.darcs/sources resets the global default to the single entry for
>>>> ~/.darcs/cache. Everything else is taken care of automatically.
>>>
>>> Sounds good to me (modulo the copying versus fallthrough question).
>>
>> Good. It's on my TODO list now.
>>
>> Cheers
>> Ben
--
"Make it so they have to reboot after every typo." ― Scott Adams
More information about the darcs-devel
mailing list