remove support code for ancient git-annex-shell version
Wow, 5.20140405.. Yeah, definitely not supported any more, just landed commits need 6.20180312.
This commit is contained in:
parent
17a0fa3dbc
commit
b7d5d54b06
1 changed files with 3 additions and 23 deletions
|
@ -42,15 +42,13 @@ transportUsingCmd' cmd params (RemoteRepo r gc) url transporthandle ichan ochan
|
|||
p = (proc cmd (toCommand params))
|
||||
{ std_in = CreatePipe
|
||||
, std_out = CreatePipe
|
||||
, std_err = CreatePipe
|
||||
}
|
||||
|
||||
go (Just toh) (Just fromh) (Just errh) pid = do
|
||||
go (Just toh) (Just fromh) Nothing pid = do
|
||||
-- Run all threads until one finishes and get the status
|
||||
-- of the first to finish. Cancel the rest.
|
||||
status <- catchDefaultIO (Right ConnectionClosed) $
|
||||
handlestderr errh
|
||||
`race` handlestdout fromh
|
||||
handlestdout fromh
|
||||
`race` handlecontrol
|
||||
|
||||
send (DISCONNECTED url)
|
||||
|
@ -58,7 +56,7 @@ transportUsingCmd' cmd params (RemoteRepo r gc) url transporthandle ichan ochan
|
|||
hClose fromh
|
||||
void $ waitForProcess pid
|
||||
|
||||
return $ either (either id id) id status
|
||||
return $ either id id status
|
||||
go _ _ _ _ = error "internal"
|
||||
|
||||
send msg = atomically $ writeTChan ochan msg
|
||||
|
@ -88,21 +86,3 @@ transportUsingCmd' cmd params (RemoteRepo r gc) url transporthandle ichan ochan
|
|||
STOP -> return ConnectionStopping
|
||||
LOSTNET -> return ConnectionStopping
|
||||
_ -> handlecontrol
|
||||
|
||||
-- Old versions of git-annex-shell that do not support
|
||||
-- the notifychanges command will exit with a not very useful
|
||||
-- error message. Detect that error, and avoid reconnecting.
|
||||
-- Propigate all stderr.
|
||||
handlestderr errh = do
|
||||
s <- hGetSomeString errh 1024
|
||||
hPutStr stderr s
|
||||
hFlush stderr
|
||||
if "git-annex-shell: git-shell failed" `isInfixOf` s
|
||||
then do
|
||||
send $ WARNING url $ unwords
|
||||
[ "Remote", Git.repoDescribe r
|
||||
, "needs its git-annex upgraded"
|
||||
, "to 5.20140405 or newer"
|
||||
]
|
||||
return ConnectionStopping
|
||||
else handlestderr errh
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue