remove support code for ancient git-annex-shell version
authorJoey Hess <joeyh@joeyh.name>
Mon, 11 Oct 2021 20:05:34 +0000 (16:05 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 11 Oct 2021 20:07:08 +0000 (16:07 -0400)
Wow, 5.20140405.. Yeah, definitely not supported any more, just landed
commits need 6.20180312.

RemoteDaemon/Transport/Ssh.hs

index 2926b347139edaf336f2b4bf0fff72e5c5c042cc..eff692120b3907144bf5c29f53e48590e0c42e02 100644 (file)
@@ -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