summaryrefslogtreecommitdiff
path: root/Logs/PreferredContent/Raw.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Logs/PreferredContent/Raw.hs')
-rw-r--r--Logs/PreferredContent/Raw.hs13
1 files changed, 6 insertions, 7 deletions
diff --git a/Logs/PreferredContent/Raw.hs b/Logs/PreferredContent/Raw.hs
index e23b09c55..8df5edd43 100644
--- a/Logs/PreferredContent/Raw.hs
+++ b/Logs/PreferredContent/Raw.hs
@@ -7,9 +7,6 @@
module Logs.PreferredContent.Raw where
-import qualified Data.Map as M
-import Data.Time.Clock.POSIX
-
import Annex.Common
import qualified Annex.Branch
import qualified Annex
@@ -19,6 +16,8 @@ import Logs.MapLog
import Types.StandardGroups
import Types.Group
+import qualified Data.Map as M
+
{- Changes the preferred content configuration of a remote. -}
preferredContentSet :: UUID -> PreferredContentExpression -> Annex ()
preferredContentSet = setLog preferredContentLog
@@ -28,10 +27,10 @@ requiredContentSet = setLog requiredContentLog
setLog :: FilePath -> UUID -> PreferredContentExpression -> Annex ()
setLog logfile uuid@(UUID _) val = do
- ts <- liftIO getPOSIXTime
+ c <- liftIO currentVectorClock
Annex.Branch.change logfile $
showLog id
- . changeLog ts uuid val
+ . changeLog c uuid val
. parseLog Just
Annex.changeState $ \s -> s
{ Annex.preferredcontentmap = Nothing
@@ -42,10 +41,10 @@ setLog _ NoUUID _ = error "unknown UUID; cannot modify"
{- Changes the preferred content configuration of a group. -}
groupPreferredContentSet :: Group -> PreferredContentExpression -> Annex ()
groupPreferredContentSet g val = do
- ts <- liftIO getPOSIXTime
+ c <- liftIO currentVectorClock
Annex.Branch.change groupPreferredContentLog $
showMapLog id id
- . changeMapLog ts g val
+ . changeMapLog c g val
. parseMapLog Just Just
Annex.changeState $ \s -> s { Annex.preferredcontentmap = Nothing }