diff options
author | Joey Hess <joey@kitenet.net> | 2012-11-12 01:05:04 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-11-12 01:05:04 -0400 |
commit | 064d217d69e052eb0e84b699a70353f997fc7d2f (patch) | |
tree | bad4f6efa2c4b85ebf161f33ec20c57571b78495 /Command/Drop.hs | |
parent | eccc97940da7f1a5f97dc700ec3e2e12cb78c851 (diff) |
where indentation
Diffstat (limited to 'Command/Drop.hs')
-rw-r--r-- | Command/Drop.hs | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/Command/Drop.hs b/Command/Drop.hs index 9e58701db..6c210b1e1 100644 --- a/Command/Drop.hs +++ b/Command/Drop.hs @@ -76,8 +76,8 @@ performRemote key numcopies remote = lockContent key $ do stopUnless (canDropKey key numcopies have tocheck [uuid]) $ do ok <- Remote.removeKey remote key next $ cleanupRemote key remote ok - where - uuid = Remote.uuid remote + where + uuid = Remote.uuid remote cleanupLocal :: Key -> CommandCleanup cleanupLocal key = do @@ -106,20 +106,20 @@ canDropKey key numcopiesM have check skip = do findCopies :: Key -> Int -> [UUID] -> [UUID] -> [Remote] -> Annex Bool findCopies key need skip = helper [] - where - helper bad have [] - | length have >= need = return True - | otherwise = notEnoughCopies key need have skip bad - helper bad have (r:rs) - | length have >= need = return True - | otherwise = do - let u = Remote.uuid r - let duplicate = u `elem` have - haskey <- Remote.hasKey r key - case (duplicate, haskey) of - (False, Right True) -> helper bad (u:have) rs - (False, Left _) -> helper (r:bad) have rs - _ -> helper bad have rs + where + helper bad have [] + | length have >= need = return True + | otherwise = notEnoughCopies key need have skip bad + helper bad have (r:rs) + | length have >= need = return True + | otherwise = do + let u = Remote.uuid r + let duplicate = u `elem` have + haskey <- Remote.hasKey r key + case (duplicate, haskey) of + (False, Right True) -> helper bad (u:have) rs + (False, Left _) -> helper (r:bad) have rs + _ -> helper bad have rs notEnoughCopies :: Key -> Int -> [UUID] -> [UUID] -> [Remote] -> Annex Bool notEnoughCopies key need have skip bad = do @@ -132,6 +132,6 @@ notEnoughCopies key need have skip bad = do Remote.showLocations key (have++skip) hint return False - where - unsafe = showNote "unsafe" - hint = showLongNote "(Use --force to override this check, or adjust annex.numcopies.)" + where + unsafe = showNote "unsafe" + hint = showLongNote "(Use --force to override this check, or adjust annex.numcopies.)" |