hashed-storage 0.5.1 → 0.5.2
raw patch · 2 files changed
+8/−1 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Storage/Hashed/Monad.hs +7/−0
- hashed-storage.cabal +1/−1
Storage/Hashed/Monad.hs view
@@ -117,6 +117,12 @@ , changed = (S.union paths (changed st)) , changesize = (changesize st + change) } +renameChanged from to = modify $ \st -> st { changed = rename' $ changed st }+ where rename' = S.fromList . map renameone . S.toList+ renameone x | from `isPrefix` x = to `catPaths` relative from x+ | otherwise = x+ relative (AnchoredPath from) (AnchoredPath x) = AnchoredPath $ drop (length from) x+ -- | Replace an item with a new version without modifying the content of the -- tree. This does not do any change tracking. Ought to be only used from a -- 'sync' implementation for a particular storage format. The presumed use-case@@ -212,3 +218,4 @@ unless (isNothing item) $ do modifyItem from Nothing modifyItem to item+ renameChanged from to
hashed-storage.cabal view
@@ -1,5 +1,5 @@ name: hashed-storage-version: 0.5.1+version: 0.5.2 synopsis: Hashed file storage support code. description: Support code for reading and manipulating hashed file storage