vicfg: New command, allows editing (or simply viewing) most of the repository configuration settings stored in the git-annex branch.
Incomplete; I need to finish parsing and saving. This will also be used for editing transfer control expresssions. Removed the group display from the status output, I didn't really like that format, and vicfg can be used to see as well as edit rempository group membership.
This commit is contained in:
parent
949fdcb63a
commit
7a7f63182c
10 changed files with 179 additions and 45 deletions
|
@ -7,7 +7,9 @@
|
|||
|
||||
module Types.TrustLevel (
|
||||
TrustLevel(..),
|
||||
TrustMap
|
||||
TrustMap,
|
||||
readTrustLevel,
|
||||
showTrustLevel,
|
||||
) where
|
||||
|
||||
import qualified Data.Map as M
|
||||
|
@ -15,6 +17,19 @@ import qualified Data.Map as M
|
|||
import Types.UUID
|
||||
|
||||
data TrustLevel = Trusted | SemiTrusted | UnTrusted | DeadTrusted
|
||||
deriving Eq
|
||||
deriving (Eq, Enum, Ord)
|
||||
|
||||
type TrustMap = M.Map UUID TrustLevel
|
||||
|
||||
readTrustLevel :: String -> Maybe TrustLevel
|
||||
readTrustLevel "trusted" = Just Trusted
|
||||
readTrustLevel "untrusted" = Just UnTrusted
|
||||
readTrustLevel "semitrusted" = Just SemiTrusted
|
||||
readTrustLevel "dead" = Just DeadTrusted
|
||||
readTrustLevel _ = Nothing
|
||||
|
||||
showTrustLevel :: TrustLevel -> String
|
||||
showTrustLevel Trusted = "trusted"
|
||||
showTrustLevel UnTrusted = "untrusted"
|
||||
showTrustLevel SemiTrusted = "semitrusted"
|
||||
showTrustLevel DeadTrusted = "dead"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue