implement annex.tune.objecthashlower

Split out Annex.DirHashes which never really belonged in Locations.
This commit is contained in:
Joey Hess 2015-01-28 16:51:40 -04:00
parent e8c376e0ad
commit 009bd050c1
6 changed files with 109 additions and 68 deletions

View file

@ -19,6 +19,7 @@ import System.FilePath.Posix
#ifdef mingw32_HOST_OS
import Data.String.Utils
#endif
import Annex.DirHashes
type RsyncUrl = String
@ -36,7 +37,7 @@ rsyncEscape o u
| otherwise = u
rsyncUrls :: RsyncOpts -> Key -> [RsyncUrl]
rsyncUrls o k = map use (annexHashes def)
rsyncUrls o k = map (use . def) dirHashes
where
use h = rsyncUrl o </> hash h </> rsyncEscape o (f </> f)
f = keyFile k