follow-on changes from MetaData type changes
Including writing and parsing the metadata log files with bytestring-builder and attoparsec.
This commit is contained in:
parent
16c798b5ef
commit
cb375977a6
14 changed files with 102 additions and 81 deletions
|
@ -28,6 +28,7 @@ import qualified Git.Ref
|
|||
import Git.Types
|
||||
import Logs.File
|
||||
|
||||
import qualified Data.Text as T
|
||||
import qualified Data.Set as S
|
||||
import Data.Char
|
||||
|
||||
|
@ -74,15 +75,15 @@ branchView view
|
|||
branchcomp c
|
||||
| viewVisible c = branchcomp' c
|
||||
| otherwise = "(" ++ branchcomp' c ++ ")"
|
||||
branchcomp' (ViewComponent metafield viewfilter _) =concat
|
||||
[ forcelegal (fromMetaField metafield)
|
||||
branchcomp' (ViewComponent metafield viewfilter _) = concat
|
||||
[ forcelegal (T.unpack (fromMetaField metafield))
|
||||
, branchvals viewfilter
|
||||
]
|
||||
branchvals (FilterValues set) = '=' : branchset set
|
||||
branchvals (FilterGlob glob) = '=' : forcelegal glob
|
||||
branchvals (ExcludeValues set) = "!=" ++ branchset set
|
||||
branchset = intercalate ","
|
||||
. map (forcelegal . fromMetaValue)
|
||||
. map (forcelegal . decodeBS . fromMetaValue)
|
||||
. S.toList
|
||||
forcelegal s
|
||||
| Git.Ref.legal True s = s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue