diff options
Diffstat (limited to 'Logs')
-rw-r--r-- | Logs/MapLog.hs | 5 | ||||
-rw-r--r-- | Logs/UUID.hs | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/Logs/MapLog.hs b/Logs/MapLog.hs index a881eae34..74ddee582 100644 --- a/Logs/MapLog.hs +++ b/Logs/MapLog.hs @@ -7,6 +7,7 @@ - A line of the log will look like: "timestamp field value" - - Copyright 2014 Joey Hess <id@joeyh.name> + - Copyright 2022 Benjamin Barenblat <bbarenblat@gmail.com> - - Licensed under the GNU GPL version 3 or higher. -} @@ -21,7 +22,7 @@ import Common import Annex.VectorClock import Logs.Line -import qualified Data.Map as M +import qualified Data.Map.Strict as M data LogEntry v = LogEntry { changed :: VectorClock @@ -56,7 +57,7 @@ changeMapLog c f v = M.insert f $ LogEntry c v {- Only add an LogEntry if it's newer (or at least as new as) than any - existing LogEntry for a field. -} addMapLog :: Ord f => f -> LogEntry v -> MapLog f v -> MapLog f v -addMapLog = M.insertWith' best +addMapLog = M.insertWith best {- Converts a MapLog into a simple Map without the timestamp information. - This is a one-way trip, but useful for code that never needs to change diff --git a/Logs/UUID.hs b/Logs/UUID.hs index 8da727228..9984e2b76 100644 --- a/Logs/UUID.hs +++ b/Logs/UUID.hs @@ -9,6 +9,7 @@ - uuid.log stores a list of known uuids, and their descriptions. - - Copyright 2010-2012 Joey Hess <id@joeyh.name> + - Copyright 2022 Benjamin Barenblat <bbarenblat@gmail.com> - - Licensed under the GNU GPL version 3 or higher. -} @@ -29,7 +30,7 @@ import Logs import Logs.UUIDBased import qualified Annex.UUID -import qualified Data.Map as M +import qualified Data.Map.Strict as M {- Records a description for a uuid in the log. -} describeUUID :: UUID -> String -> Annex () @@ -79,7 +80,7 @@ uuidMapLoad :: Annex UUIDMap uuidMapLoad = do m <- (simpleMap . parseLog Just) <$> Annex.Branch.get uuidLog u <- Annex.UUID.getUUID - let m' = M.insertWith' preferold u "" m + let m' = M.insertWith preferold u "" m Annex.changeState $ \s -> s { Annex.uuidmap = Just m' } return m' where |