tweak field name

This commit is contained in:
Joey Hess 2012-08-26 14:26:43 -04:00
parent 20a451a58b
commit 78d3add86b
10 changed files with 12 additions and 13 deletions

View file

@ -175,7 +175,7 @@ remotesUnder st dstatus dir = runThreadState st $ do
updateKnownRemotes dstatus updateKnownRemotes dstatus
return $ map snd $ filter fst pairs return $ map snd $ filter fst pairs
where where
checkremote repotop r = case Remote.path r of checkremote repotop r = case Remote.localpath r of
Just p | dirContains dir (absPathFrom repotop p) -> Just p | dirContains dir (absPathFrom repotop p) ->
(,) <$> pure True <*> updateRemote r (,) <$> pure True <*> updateRemote r
_ -> return (False, r) _ -> return (False, r)

View file

@ -128,6 +128,5 @@ handleConnection st dstatus scanremotes = do
{- Finds network remotes. -} {- Finds network remotes. -}
networkRemotes :: ThreadState -> IO [Remote] networkRemotes :: ThreadState -> IO [Remote]
networkRemotes st = runThreadState st $ do networkRemotes st = runThreadState st $
rs <- remoteList filter (isNothing . Remote.localpath) <$> remoteList
return $ filter (isNothing . Remote.path) rs

View file

@ -60,7 +60,7 @@ gen r u c = do
, whereisKey = Nothing , whereisKey = Nothing
, config = c , config = c
, repo = r , repo = r
, path = if bupLocal buprepo && not (null buprepo) , localpath = if bupLocal buprepo && not (null buprepo)
then Just buprepo then Just buprepo
else Nothing else Nothing
, remotetype = remote , remotetype = remote

View file

@ -53,7 +53,7 @@ gen r u c = do
whereisKey = Nothing, whereisKey = Nothing,
config = Nothing, config = Nothing,
repo = r, repo = r,
path = Just dir, localpath = Just dir,
remotetype = remote remotetype = remote
} }
where where

View file

@ -94,7 +94,7 @@ gen r u _ = new <$> remoteCost r defcst
, hasKeyCheap = repoCheap r , hasKeyCheap = repoCheap r
, whereisKey = Nothing , whereisKey = Nothing
, config = Nothing , config = Nothing
, path = if Git.repoIsLocal r || Git.repoIsLocalUnknown r , localpath = if Git.repoIsLocal r || Git.repoIsLocalUnknown r
then Just $ Git.repoPath r then Just $ Git.repoPath r
else Nothing else Nothing
, repo = r , repo = r

View file

@ -48,7 +48,7 @@ gen r u c = do
hasKeyCheap = False, hasKeyCheap = False,
whereisKey = Nothing, whereisKey = Nothing,
config = Nothing, config = Nothing,
path = Nothing, localpath = Nothing,
repo = r, repo = r,
remotetype = remote remotetype = remote
} }

View file

@ -58,7 +58,7 @@ gen r u c = do
, whereisKey = Nothing , whereisKey = Nothing
, config = Nothing , config = Nothing
, repo = r , repo = r
, path = if rsyncUrlIsPath $ rsyncUrl o , localpath = if rsyncUrlIsPath $ rsyncUrl o
then Just $ rsyncUrl o then Just $ rsyncUrl o
else Nothing else Nothing
, remotetype = remote , remotetype = remote

View file

@ -60,7 +60,7 @@ gen' r u c cst =
whereisKey = Nothing, whereisKey = Nothing,
config = c, config = c,
repo = r, repo = r,
path = Nothing, localpath = Nothing,
remotetype = remote remotetype = remote
} }

View file

@ -47,7 +47,7 @@ gen r _ _ =
hasKeyCheap = False, hasKeyCheap = False,
whereisKey = Just getUrls, whereisKey = Just getUrls,
config = Nothing, config = Nothing,
path = Nothing, localpath = Nothing,
repo = r, repo = r,
remotetype = remote remotetype = remote
} }

View file

@ -64,8 +64,8 @@ data RemoteA a = Remote {
config :: Maybe RemoteConfig, config :: Maybe RemoteConfig,
-- git configuration for the remote -- git configuration for the remote
repo :: Git.Repo, repo :: Git.Repo,
-- a Remote can be assocated with a specific filesystem path -- a Remote can be assocated with a specific local filesystem path
path :: Maybe FilePath, localpath :: Maybe FilePath,
-- the type of the remote -- the type of the remote
remotetype :: RemoteTypeA a remotetype :: RemoteTypeA a
} }