summaryrefslogtreecommitdiff
path: root/UUID.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-01-26 15:37:16 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-01-26 15:37:16 -0400
commit268cb35e644754093db003aee08d050a1f3f9466 (patch)
treec00319c584a9ad020027eebc1af2e1a525a55473 /UUID.hs
parentf7e3d6eea2f71efe14c3ccb29ef4e88840384d02 (diff)
implement 3 level trust storage in trust.log
Diffstat (limited to 'UUID.hs')
-rw-r--r--UUID.hs30
1 files changed, 1 insertions, 29 deletions
diff --git a/UUID.hs b/UUID.hs
index 26a64523f..ec6702689 100644
--- a/UUID.hs
+++ b/UUID.hs
@@ -17,10 +17,7 @@ module UUID (
reposWithoutUUID,
prettyPrintUUIDs,
describeUUID,
- uuidLog,
- trustLog,
- getTrusted,
- setTrusted
+ uuidLog
) where
import Control.Monad.State
@@ -141,28 +138,3 @@ uuidLog :: Annex FilePath
uuidLog = do
g <- Annex.gitRepo
return $ gitStateDir g ++ "uuid.log"
-
-{- Filename of trust.log. -}
-trustLog :: Annex FilePath
-trustLog = do
- g <- Annex.gitRepo
- return $ gitStateDir g ++ "trust.log"
-
-{- List of trusted UUIDs. -}
-getTrusted :: Annex [UUID]
-getTrusted = do
- logfile <- trustLog
- s <- liftIO $ catch (readFile logfile) ignoreerror
- return $ parse s
- where
- parse [] = []
- parse s = map firstword $ lines s
- firstword [] = ""
- firstword l = head $ words l
- ignoreerror _ = return ""
-
-{- Changes the list of trusted UUIDs. -}
-setTrusted :: [UUID] -> Annex ()
-setTrusted u = do
- logfile <- trustLog
- liftIO $ safeWriteFile logfile $ unlines u