[darcs-users] ANN: hashed-storage 0.1
Petr Rockai
me at mornfall.net
Mon Jan 26 13:21:38 UTC 2009
Hi again,
Petr Rockai <me at mornfall.net> writes:
> What the library currently provides can be seen in the haddock-produced
> documentation:
> http://repos.mornfall.net/hashed-storage/dist/doc/html/hashed-storage/Storage-Hashed.html
I have now updated the docs and expanded the functionality somewhat.
You can now do eg. (in ghci Storage/Hashed.hs inside the repo):
*Storage.Hashed> a <- readDarcsPristine "." >>= unfoldAll
*Storage.Hashed> b <- readPlainTree "." >>= unfoldRestricted a
*Storage.Hashed> putStr $ unlines . map (fst . location) $ blobs b
This will list all files that are under darcs control. Details about how
unfold* (and why) in the haddocks linked above.
I have also added decompression for readDarcsHashed, since the contents are
always compressed there, regardless of --dont-compress and friends (I have just
discovered that... it makes sense, since otherwise there would be no way to
distinguish a copy of a binary gzipped file in pristine).
Moreover, I have added some functions for playing around with ghci, so you can
now do (continuing the previous session):
*Storage.Hashed> printPath a "."
*Storage.Hashed> printPath b "."
*Storage.Hashed> printPath a "hashed-storage.cabal"
*Storage.Hashed> printPath b "hashed-storage.cabal"
And so on. There are quite a few directions in which this needs expanding:
1. I will now probably start thinking on how to implement some useful unit
tests for the code.
2. A module for using some sort of cache, akin to what darcs currently does,
and an appropriate interface between those two.
3. Implementation of writing and syncing darcs-style hashed pristine.
4. Implementation of "indexed plain tree", a somewhat different approach to the
mtime optimisation (one that I find more general and less interfering with
the generality of the Tree structure and interfaces). Details in code form,
later.
5. Implementation of a new disk format for Tree, that would do some smart
packing.
6. Benchmarking (both different trees and against darcs itself).
I will be taking on those as time and motivation permits.
Yours,
Petr.
--
Peter Rockai | me()mornfall!net | prockai()redhat!com
http://blog.mornfall.net | http://web.mornfall.net
"In My Egotistical Opinion, most people's C programs should be
indented six feet downward and covered with dirt."
-- Blair P. Houghton on the subject of C program indentation
More information about the darcs-users
mailing list