propagate debugging into remote's Annex monad
This is needed to make the debugging added in
0073384850
actually be displayed when
running git-annex get from a local remote.
This commit is contained in:
parent
1fc6e6a65f
commit
e676cd43c0
1 changed files with 14 additions and 4 deletions
|
@ -269,7 +269,7 @@ tryGitConfigRead autoinit r hasuuid
|
||||||
set_ignore "uses a protocol not supported by git-annex" False
|
set_ignore "uses a protocol not supported by git-annex" False
|
||||||
return r
|
return r
|
||||||
| otherwise = storeUpdatedRemote $
|
| otherwise = storeUpdatedRemote $
|
||||||
liftIO readlocalannexconfig
|
readlocalannexconfig
|
||||||
`catchNonAsync` const failedreadlocalconfig
|
`catchNonAsync` const failedreadlocalconfig
|
||||||
where
|
where
|
||||||
haveconfig = not . M.null . Git.config
|
haveconfig = not . M.null . Git.config
|
||||||
|
@ -355,8 +355,8 @@ tryGitConfigRead autoinit r hasuuid
|
||||||
warning $ "remote " ++ Git.repoDescribe r ++
|
warning $ "remote " ++ Git.repoDescribe r ++
|
||||||
":" ++ show e
|
":" ++ show e
|
||||||
Annex.getState Annex.repo
|
Annex.getState Annex.repo
|
||||||
s <- Annex.new r
|
s <- newLocal r
|
||||||
Annex.eval s $ check `finally` stopCoProcesses
|
liftIO $ Annex.eval s $ check `finally` stopCoProcesses
|
||||||
|
|
||||||
failedreadlocalconfig = do
|
failedreadlocalconfig = do
|
||||||
unless hasuuid $ case Git.remoteName r of
|
unless hasuuid $ case Git.remoteName r of
|
||||||
|
@ -773,10 +773,20 @@ onLocalRepo repo a = do
|
||||||
lra <- mkLocalRemoteAnnex repo
|
lra <- mkLocalRemoteAnnex repo
|
||||||
onLocal' lra a
|
onLocal' lra a
|
||||||
|
|
||||||
|
newLocal :: Git.Repo -> Annex (Annex.AnnexState, Annex.AnnexRead)
|
||||||
|
newLocal repo = do
|
||||||
|
(st, rd) <- liftIO $ Annex.new repo
|
||||||
|
debugenabled <- Annex.getRead Annex.debugenabled
|
||||||
|
debugselector <- Annex.getRead Annex.debugselector
|
||||||
|
return (st, rd
|
||||||
|
{ Annex.debugenabled = debugenabled
|
||||||
|
, Annex.debugselector = debugselector
|
||||||
|
})
|
||||||
|
|
||||||
onLocal' :: LocalRemoteAnnex -> Annex a -> Annex a
|
onLocal' :: LocalRemoteAnnex -> Annex a -> Annex a
|
||||||
onLocal' (LocalRemoteAnnex repo mv) a = liftIO (takeMVar mv) >>= \case
|
onLocal' (LocalRemoteAnnex repo mv) a = liftIO (takeMVar mv) >>= \case
|
||||||
Nothing -> do
|
Nothing -> do
|
||||||
v <- liftIO $ Annex.new repo
|
v <- newLocal repo
|
||||||
go (v, ensureInitialized >> a)
|
go (v, ensureInitialized >> a)
|
||||||
Just v -> go (v, a)
|
Just v -> go (v, a)
|
||||||
where
|
where
|
||||||
|
|
Loading…
Add table
Reference in a new issue