make local bup repos a bit more expensive than local git repos

does have to run bup and reassemble files, after all
This commit is contained in:
Joey Hess 2011-04-08 23:08:21 -04:00
parent 1bfd3922c0
commit c5174f0cb8
2 changed files with 3 additions and 1 deletions

View file

@ -51,6 +51,8 @@ remoteCost r def = do
cheapRemoteCost :: Int
cheapRemoteCost = 100
semiCheapRemoteCost :: Int
semiCheapRemoteCost = 150
expensiveRemoteCost :: Int
expensiveRemoteCost = 200

View file

@ -39,7 +39,7 @@ gen :: Git.Repo -> UUID -> Maybe (M.Map String String) -> Annex (Remote Annex)
gen r u c = do
bupremote <- getConfig r "bupremote" (error "missing bupremote")
let local = ':' `notElem` bupremote
cst <- remoteCost r (if local then cheapRemoteCost else expensiveRemoteCost)
cst <- remoteCost r (if local then semiCheapRemoteCost else expensiveRemoteCost)
return $ this cst bupremote
where