summaryrefslogtreecommitdiff
path: root/Logs.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-03-15 13:44:31 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-03-15 13:45:25 -0400
commitfba52e2651cb8b2f26cdb4f38396cd9f55cf0985 (patch)
tree102cce17acd6125e85e102e05b1b0b15305f4e6d /Logs.hs
parentec579eba79d0d72e66e57e6f5c28077a5c7e201f (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.hs12
1 files changed, 11 insertions, 1 deletions
diff --git a/Logs.hs b/Logs.hs
index 21908a9cf..2a2fc430e 100644
--- a/Logs.hs
+++ b/Logs.hs
@@ -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"