add a UUID type
Should have done this a long time ago.
This commit is contained in:
parent
b08f7c428b
commit
63a292324d
18 changed files with 67 additions and 55 deletions
|
@ -53,13 +53,12 @@ parseTrust s
|
|||
|
||||
{- Changes the trust level for a uuid in the trustLog. -}
|
||||
trustSet :: UUID -> TrustLevel -> Annex ()
|
||||
trustSet uuid level = do
|
||||
when (null uuid) $
|
||||
error "unknown UUID; cannot modify trust level"
|
||||
trustSet uuid@(UUID _) level = do
|
||||
ts <- liftIO $ getPOSIXTime
|
||||
Annex.Branch.change trustLog $
|
||||
showLog show . changeLog ts uuid level . parseLog parseTrust
|
||||
Annex.changeState $ \s -> s { Annex.trustmap = Nothing }
|
||||
trustSet NoUUID _ = error "unknown UUID; cannot modify trust level"
|
||||
|
||||
{- Partitions a list of UUIDs to those matching a TrustLevel and not. -}
|
||||
trustPartition :: TrustLevel -> [UUID] -> Annex ([UUID], [UUID])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue