-Wall clean

This commit is contained in:
Joey Hess 2010-10-31 14:23:51 -04:00
parent 6a9a9bd5a3
commit dc12ce762e

View file

@ -22,19 +22,14 @@ import Control.Monad.State (liftIO)
import Control.Monad (filterM) import Control.Monad (filterM)
import qualified Data.Map as Map import qualified Data.Map as Map
import Data.String.Utils import Data.String.Utils
import Data.Either.Utils
import System.Cmd.Utils
import System.Directory import System.Directory
import System.Posix.Directory import System.Posix.Directory
import List import List
import Maybe
import Monad (when, unless) import Monad (when, unless)
import Types import Types
import qualified GitRepo as Git import qualified GitRepo as Git
import qualified Annex import qualified Annex
import qualified Backend
import qualified Core
import LocationLog import LocationLog
import Locations import Locations
import UUID import UUID
@ -73,7 +68,7 @@ keyPossibilities key = do
let todo = cheap ++ doexpensive let todo = cheap ++ doexpensive
if (not $ null todo) if (not $ null todo)
then do then do
e <- mapM tryGitConfigRead todo _ <- mapM tryGitConfigRead todo
Annex.flagChange "remotesread" $ FlagBool True Annex.flagChange "remotesread" $ FlagBool True
keyPossibilities key keyPossibilities key
else reposByUUID allremotes uuids else reposByUUID allremotes uuids
@ -121,14 +116,14 @@ reposByCost l = do
repoCost :: Git.Repo -> Annex Int repoCost :: Git.Repo -> Annex Int
repoCost r = do repoCost r = do
g <- Annex.gitRepo g <- Annex.gitRepo
if (not $ null $ config g r) if (not $ null $ config g)
then return $ read $ config g r then return $ read $ config g
else if (Git.repoIsUrl r) else if (Git.repoIsUrl r)
then return 200 then return 200
else return 100 else return 100
where where
config g r = Git.configGet g (configkey r) "" config g = Git.configGet g configkey ""
configkey r = "remote." ++ (Git.repoRemoteName r) ++ ".annex-cost" configkey = "remote." ++ (Git.repoRemoteName r) ++ ".annex-cost"
{- Checks if a repo should be ignored, based either on annex-ignore {- Checks if a repo should be ignored, based either on annex-ignore
- setting, or on command-line options. Allows command-line to override - setting, or on command-line options. Allows command-line to override
@ -174,7 +169,7 @@ tryGitConfigRead r = do
-- for other reasons; catch all possible exceptions -- for other reasons; catch all possible exceptions
result <- liftIO $ (try (Git.configRead r)::IO (Either SomeException (Git.Repo))) result <- liftIO $ (try (Git.configRead r)::IO (Either SomeException (Git.Repo)))
case (result) of case (result) of
Left e -> return $ Left r Left _ -> return $ Left r
Right r' -> do Right r' -> do
g <- Annex.gitRepo g <- Annex.gitRepo
let l = Git.remotes g let l = Git.remotes g
@ -184,7 +179,7 @@ tryGitConfigRead r = do
return $ Right r' return $ Right r'
else return $ Right r -- config already read else return $ Right r -- config already read
where where
exchange [] new = [] exchange [] _ = []
exchange (old:ls) new = exchange (old:ls) new =
if (Git.repoRemoteName old == Git.repoRemoteName new) if (Git.repoRemoteName old == Git.repoRemoteName new)
then new:(exchange ls new) then new:(exchange ls new)