diff options
author | Joey Hess <joey@kitenet.net> | 2011-11-09 01:15:51 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-11-09 01:33:20 -0400 |
commit | 56b8194470f0ddc1b3e1c51da8ca55a5c9c2eb05 (patch) | |
tree | a03330e0fd21dc8f2f433fb3f5b568418037db8c /Logs | |
parent | bf460a0a98d7e4c7f4eac525fcf300629db582b6 (diff) |
cleanup
Diffstat (limited to 'Logs')
-rw-r--r-- | Logs/Location.hs | 9 | ||||
-rw-r--r-- | Logs/Web.hs | 3 |
2 files changed, 4 insertions, 8 deletions
diff --git a/Logs/Location.hs b/Logs/Location.hs index ff874a596..ab29ffcad 100644 --- a/Logs/Location.hs +++ b/Logs/Location.hs @@ -23,16 +23,13 @@ module Logs.Location ( ) where import Common.Annex -import qualified Git import qualified Annex.Branch import Logs.Presence {- Log a change in the presence of a key's value in a repository. -} -logChange :: Git.Repo -> Key -> UUID -> LogStatus -> Annex () -logChange _ key (UUID u) s = addLog (logFile key) =<< logNow s u -logChange repo _ NoUUID _ = error $ - "unknown UUID for " ++ Git.repoDescribe repo ++ - " (have you run git annex init there?)" +logChange :: Key -> UUID -> LogStatus -> Annex () +logChange key (UUID u) s = addLog (logFile key) =<< logNow s u +logChange _ NoUUID _ = return () {- Returns a list of repository UUIDs that, according to the log, have - the value of a key. -} diff --git a/Logs/Web.hs b/Logs/Web.hs index b52e347e5..62656b7ed 100644 --- a/Logs/Web.hs +++ b/Logs/Web.hs @@ -42,12 +42,11 @@ getUrls key = do {- Records a change in an url for a key. -} setUrl :: Key -> URLString -> LogStatus -> Annex () setUrl key url status = do - g <- gitRepo addLog (urlLog key) =<< logNow status url -- update location log to indicate that the web has the key, or not us <- getUrls key - logChange g key webUUID (if null us then InfoMissing else InfoPresent) + logChange key webUUID (if null us then InfoMissing else InfoPresent) setUrlPresent :: Key -> URLString -> Annex () setUrlPresent key url = setUrl key url InfoPresent |