diff options
author | Joey Hess <joey@kitenet.net> | 2014-03-15 13:44:31 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-03-15 13:45:25 -0400 |
commit | fba52e2651cb8b2f26cdb4f38396cd9f55cf0985 (patch) | |
tree | 102cce17acd6125e85e102e05b1b0b15305f4e6d /Logs.hs | |
parent | ec579eba79d0d72e66e57e6f5c28077a5c7e201f (diff) |
factored out a generic MapLog from uuid-based logs
UUIDBased is just a MapLog with a UUID for the field.
Diffstat (limited to 'Logs.hs')
-rw-r--r-- | Logs.hs | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -24,7 +24,7 @@ getLogVariety :: FilePath -> Maybe LogVariety getLogVariety f | f `elem` topLevelUUIDBasedLogs = Just UUIDBasedLog | isRemoteStateLog f = Just NewUUIDBasedLog - | isMetaDataLog f || f == numcopiesLog = Just OtherLog + | isMetaDataLog f || f `elem` otherLogs = Just OtherLog | otherwise = PresenceLog <$> firstJust (presenceLogs f) {- All the uuid-based logs stored in the top of the git-annex branch. -} @@ -45,6 +45,13 @@ presenceLogs f = , locationLogFileKey f ] +{- Logs that are neither UUID based nor presence logs. -} +otherLogs :: [FilePath] +otherLogs = + [ numcopiesLog + , groupPreferredContentLog + ] + uuidLog :: FilePath uuidLog = "uuid.log" @@ -63,6 +70,9 @@ groupLog = "group.log" preferredContentLog :: FilePath preferredContentLog = "preferred-content.log" +groupPreferredContentLog :: FilePath +groupPreferredContentLog = "group-preferred-content.log" + scheduleLog :: FilePath scheduleLog = "schedule.log" |