diff options
author | Joey Hess <joey@kitenet.net> | 2011-06-22 16:13:43 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-06-22 16:17:16 -0400 |
commit | 1870186632e3d4f99e9b87f71f0ddea83ad04568 (patch) | |
tree | 2abd0484a9a729c8ec79997e25d5d5d92e0bdf3b /LocationLog.hs | |
parent | e0bd9d43a21bae8193cb0a56be2246ee8cdafdaa (diff) |
fixed logFile
Diffstat (limited to 'LocationLog.hs')
-rw-r--r-- | LocationLog.hs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/LocationLog.hs b/LocationLog.hs index 68a1eb790..8dbeb729c 100644 --- a/LocationLog.hs +++ b/LocationLog.hs @@ -20,8 +20,7 @@ module LocationLog ( readLog, writeLog, keyLocations, - loggedKeys, - logFile + loggedKeys ) where import Data.Time.Clock.POSIX @@ -89,7 +88,7 @@ logChange repo key u s = do error $ "unknown UUID for " ++ Git.repoDescribe repo ++ " (have you run git annex init there?)" line <- logNow s u - let f = logFile repo key + let f = logFile key ls <- readLog f writeLog f (compactLog $ line:ls) @@ -116,9 +115,9 @@ logNow s u = do {- Returns a list of repository UUIDs that, according to the log, have - the value of a key. -} -keyLocations :: Git.Repo -> Key -> Annex [UUID] -keyLocations thisrepo key = do - ls <- readLog $ logFile thisrepo key +keyLocations :: Key -> Annex [UUID] +keyLocations key = do + ls <- readLog $ logFile key return $ map uuid $ filterPresent ls {- Filters the list of LogLines to find ones where the value @@ -151,7 +150,7 @@ mapLog m l = - (There may be duplicate keys in the list.) -} loggedKeys :: Git.Repo -> Annex [Key] loggedKeys repo = do - error "FIXME.. does not look in git-annex branch yet" + _ <- error "FIXME.. does not look in git-annex branch yet" exists <- liftIO $ doesDirectoryExist dir if exists then do |