diff options
author | Joey Hess <joey@kitenet.net> | 2014-03-18 18:55:43 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-03-18 18:55:43 -0400 |
commit | 2402266d0d9731445af1876327a43795795d1a18 (patch) | |
tree | 2f52191002e8ee79275c2f4e6070b057a61f9389 /Command | |
parent | 9adb236103d0b8f1db8110b40cc33b9fe5fda4ae (diff) |
Each for each metadata field, there's now an automatically maintained "$field-lastchanged" that gives the timestamp of the last change to that field.
Note that this is a nearly entirely free feature. The data was already
stored in the metadata log in an easily accessible way, and already was
parsed to a time when parsing the log. The generation of the metadata
fields may even be done lazily, although probably not entirely (the map
has to be evaulated to when queried).
Diffstat (limited to 'Command')
-rw-r--r-- | Command/MetaData.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Command/MetaData.hs b/Command/MetaData.hs index 46d112162..d932315ab 100644 --- a/Command/MetaData.hs +++ b/Command/MetaData.hs @@ -12,7 +12,6 @@ import qualified Annex import Command import Annex.MetaData import Logs.MetaData -import Types.MetaData import qualified Data.Set as S import Data.Time.Clock.POSIX @@ -84,7 +83,7 @@ perform :: POSIXTime -> [ModMeta] -> Key -> CommandPerform perform _ [] k = next $ cleanup k perform now ms k = do oldm <- getCurrentMetaData k - let m = foldl' unionMetaData emptyMetaData $ map (modMeta oldm) ms + let m = combineMetaData $ map (modMeta oldm) ms addMetaData' k m now next $ cleanup k |