add remote start and stop hooks
Locking is used, so that, if there are multiple git-annex processes using a remote concurrently, the stop hook is only run by the last process that uses it.
This commit is contained in:
parent
fba66c55ed
commit
52e88f3ebf
5 changed files with 118 additions and 1 deletions
|
@ -15,6 +15,7 @@ import Logs.Remote
|
|||
import Types.Remote
|
||||
import Annex.UUID
|
||||
import Config
|
||||
import Remote.Helper.Hooks
|
||||
|
||||
import qualified Remote.Git
|
||||
import qualified Remote.S3
|
||||
|
@ -51,7 +52,7 @@ remoteList = do
|
|||
process m t = enumerate t >>= mapM (gen m t)
|
||||
gen m t r = do
|
||||
u <- getRepoUUID r
|
||||
generate t r u (M.lookup u m)
|
||||
addHooks =<< generate t r u (M.lookup u m)
|
||||
|
||||
{- All remotes that are not ignored. -}
|
||||
enabledRemoteList :: Annex [Remote]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue