summaryrefslogtreecommitdiff
path: root/UUID.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-14 02:36:41 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-14 02:36:41 -0400
commit48643b68b3ff05399b72f44b8b02ff34d6de046c (patch)
tree530364b80bada325413dfa86f7b5e68ee007ee27 /UUID.hs
parenteda80e44c5fb399fa4e5625388d6e0f993b0f779 (diff)
convert GitRepo to qualified import
Diffstat (limited to 'UUID.hs')
-rw-r--r--UUID.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/UUID.hs b/UUID.hs
index f334afdc9..9c8b23a96 100644
--- a/UUID.hs
+++ b/UUID.hs
@@ -19,7 +19,7 @@ import Maybe
import List
import System.Cmd.Utils
import System.IO
-import GitRepo
+import qualified GitRepo as Git
import AbstractTypes
type UUID = String
@@ -37,17 +37,17 @@ genUUID = liftIO $ pOpen ReadFromPipe "uuid" ["-m"] $ \h -> hGetLine h
- remote.<name>.annex-uuid
-
- -}
-getUUID :: GitRepo -> Annex UUID
+getUUID :: Git.Repo -> Annex UUID
getUUID r = do
if ("" /= configured r)
then return $ configured r
else cached r
where
- configured r = gitConfig r "annex.uuid" ""
+ configured r = Git.configGet r "annex.uuid" ""
cached r = do
g <- gitAnnex
- return $ gitConfig g (configkey r) ""
- configkey r = "remote." ++ (gitRepoRemoteName r) ++ ".annex-uuid"
+ return $ Git.configGet g (configkey r) ""
+ configkey r = "remote." ++ (Git.repoRemoteName r) ++ ".annex-uuid"
{- Make sure that the repo has an annex.uuid setting. -}
prepUUID :: Annex ()
@@ -57,15 +57,15 @@ prepUUID = do
if ("" == u)
then do
uuid <- genUUID
- liftIO $ gitRun g ["config", configkey, uuid]
+ liftIO $ Git.run g ["config", configkey, uuid]
-- re-read git config and update the repo's state
- u' <- liftIO $ gitConfigRead g
+ u' <- liftIO $ Git.configRead g
gitAnnexChange u'
return ()
else return ()
{- Filters a list of repos to ones that have listed UUIDs. -}
-reposByUUID :: [GitRepo] -> [UUID] -> Annex [GitRepo]
+reposByUUID :: [Git.Repo] -> [UUID] -> Annex [Git.Repo]
reposByUUID repos uuids = do
filterM match repos
where