renamings to make clean when old-format logs are being used

This commit is contained in:
Joey Hess 2019-02-21 13:43:21 -04:00
parent fd304dce60
commit 9887a378fe
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
17 changed files with 56 additions and 57 deletions

10
Logs.hs
View file

@ -12,7 +12,7 @@ import Annex.DirHashes
{- There are several varieties of log file formats. -}
data LogVariety
= UUIDBasedLog
= OldUUIDBasedLog
| NewUUIDBasedLog
| ChunkLog Key
| PresenceLog Key
@ -24,16 +24,16 @@ data LogVariety
- of logs used by git-annex, if it's a known path. -}
getLogVariety :: FilePath -> Maybe LogVariety
getLogVariety f
| f `elem` topLevelUUIDBasedLogs = Just UUIDBasedLog
| f `elem` topLevelOldUUIDBasedLogs = Just OldUUIDBasedLog
| isRemoteStateLog f || isRemoteContentIdentifierLog f = Just NewUUIDBasedLog
| isChunkLog f = ChunkLog <$> chunkLogFileKey f
| isRemoteMetaDataLog f = Just RemoteMetaDataLog
| 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. -}
topLevelUUIDBasedLogs :: [FilePath]
topLevelUUIDBasedLogs =
{- All the (old-format) uuid-based logs stored in the top of the git-annex branch. -}
topLevelOldUUIDBasedLogs :: [FilePath]
topLevelOldUUIDBasedLogs =
[ uuidLog
, remoteLog
, trustLog