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:
parent
1bfd3922c0
commit
c5174f0cb8
2 changed files with 3 additions and 1 deletions
|
@ -51,6 +51,8 @@ remoteCost r def = do
|
||||||
|
|
||||||
cheapRemoteCost :: Int
|
cheapRemoteCost :: Int
|
||||||
cheapRemoteCost = 100
|
cheapRemoteCost = 100
|
||||||
|
semiCheapRemoteCost :: Int
|
||||||
|
semiCheapRemoteCost = 150
|
||||||
expensiveRemoteCost :: Int
|
expensiveRemoteCost :: Int
|
||||||
expensiveRemoteCost = 200
|
expensiveRemoteCost = 200
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ gen :: Git.Repo -> UUID -> Maybe (M.Map String String) -> Annex (Remote Annex)
|
||||||
gen r u c = do
|
gen r u c = do
|
||||||
bupremote <- getConfig r "bupremote" (error "missing bupremote")
|
bupremote <- getConfig r "bupremote" (error "missing bupremote")
|
||||||
let local = ':' `notElem` 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
|
return $ this cst bupremote
|
||||||
where
|
where
|
||||||
|
|
Loading…
Reference in a new issue