darcs

Patch 279 Drop global cache entries from _darcs/prefs/sources

Title Drop global cache entries from _darcs/prefs/sources
Superseder Nosy List abuiles, mornfall
Related Issues
Status accepted Assigned To
Milestone

Created on 2010-06-14.22:50:08 by abuiles, last changed 2011-05-10.22:07:50 by darcswatch.

Files
File name Status Uploaded Type Edit Remove
drop-global-cache-entries-from-_darcs_prefs_sources.dpatch abuiles, 2010-06-14.22:50:08 text/x-darcs-patch
unnamed abuiles, 2010-06-14.22:50:08
See mailing list archives for discussion on individual patches.
Messages
msg11418 (view) Author: abuiles Date: 2010-06-14.22:50:08
1 patch for repository http://darcs.net:

Mon Jun 14 17:13:28 COT 2010  builes.adolfo@googlemail.com
  * Drop global cache entries from _darcs/prefs/sources
Attachments
msg11423 (view) Author: mornfall Date: 2010-06-15.09:25:28
Adolfo Builes <bugs@darcs.net> writes:

> hunk ./src/Darcs/Repository/HashedRepo.hs 297
> -    dropLocalCache globalCache (Ca cache) = Ca $ filter (/= globalCache) cache
> +    dropGlobalCaches (Ca cache) = Ca $ filter notGlobalCache cache
> +    notGlobalCache xs = case xs of
> +                         Cache DarcsCache.Directory _ _ -> False
> +                         _                              -> True
You could more concisely write

repoCachesOnly (Ca cache) = Ca [ c | c@(Cache Repo _ _) <- cache ]

also in your version, the case is redundant, you can write
notGlobalCache (Cache DarcsCache.Directory _ _) = False
notGlobalCache _                                = True

On the other hand, these are stylistic tweaks, and if you like to do
them, you can post a separate patch. I am pushing this one...

Yours,
   Petr.
msg11515 (view) Author: darcswatch Date: 2010-06-21.18:06:27
This patch bundle (with 1 patches) was just applied to the repository http://darcs.net/.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-b231a03d17bce607e60d0a5d57a400b698e5c962
msg14409 (view) Author: darcswatch Date: 2011-05-10.22:07:50
This patch bundle (with 1 patches) was just applied to the repository http://darcs.net/reviewed.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-b231a03d17bce607e60d0a5d57a400b698e5c962
History
Date User Action Args
2010-06-14 22:50:08abuilescreate
2010-06-15 09:25:28mornfallsetnosy: + mornfall
messages: + msg11423
2010-06-18 17:01:20koweysetstatus: needs-review -> accepted
2010-06-21 18:06:27darcswatchsetmessages: + msg11515
2011-05-10 22:07:50darcswatchsetmessages: + msg14409