diff options
author | Joey Hess <joey@kitenet.net> | 2014-07-10 00:32:23 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-07-10 00:32:23 -0400 |
commit | c42733876bcb72d1b4c85de6bac73f1c73b216ad (patch) | |
tree | c3edc52aa7b5b90594def0cd9eb7d4d1b8fc12d2 /Remote/Helper | |
parent | 200b8d462e46db7b6bb87ab832529199fff58247 (diff) |
refactor locking
Diffstat (limited to 'Remote/Helper')
-rw-r--r-- | Remote/Helper/Hooks.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Remote/Helper/Hooks.hs b/Remote/Helper/Hooks.hs index b7deae577..c3ff970c6 100644 --- a/Remote/Helper/Hooks.hs +++ b/Remote/Helper/Hooks.hs @@ -15,7 +15,7 @@ import Common.Annex import Types.Remote import Types.CleanupActions import qualified Annex -import Annex.LockPool +import Annex.LockFile #ifndef mingw32_HOST_OS import Annex.Perms #else @@ -48,7 +48,7 @@ runHooks :: Remote -> Maybe String -> Maybe String -> Annex a -> Annex a runHooks r starthook stophook a = do dir <- fromRepo gitAnnexRemotesDir let lck = dir </> remoteid ++ ".lck" - whenM (notElem lck . M.keys <$> getPool) $ do + whenM (notElem lck . M.keys <$> getLockPool) $ do liftIO $ createDirectoryIfMissing True dir firstrun lck a @@ -63,7 +63,7 @@ runHooks r starthook stophook a = do -- of it from running the stophook. If another -- instance is shutting down right now, this -- will block waiting for its exclusive lock to clear. - lockFile lck + lockFileShared lck -- The starthook is run even if some other git-annex -- is already running, and ran it before. |