diff options
-rw-r--r-- | Annex/Ssh.hs | 16 | ||||
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | doc/bugs/bash__58___git-annex-shell__58___command_not_found/comment_1_461a8d85738d63f9d276bb33d5c24255._comment | 27 |
3 files changed, 41 insertions, 5 deletions
diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs index 50a516342..4e6cc6a59 100644 --- a/Annex/Ssh.hs +++ b/Annex/Ssh.hs @@ -193,8 +193,10 @@ prepSocket socketfile gc sshparams = do c <- Annex.getState Annex.concurrency case c of - Concurrent {} -> makeconnection socketlock - NonConcurrent -> return () + Concurrent {} + | annexUUID (remoteGitConfig gc) /= NoUUID -> + makeconnection socketlock + _ -> return () lockFileCached socketlock where @@ -207,11 +209,15 @@ prepSocket socketfile gc sshparams = do -- When we can start the connection in batch mode, -- ssh won't prompt to the console. (_, connected) <- liftIO $ processTranscript "ssh" - (["-o", "BatchMode=true"] ++ toCommand startps) + (["-o", "BatchMode=true"] + ++ toCommand startps) Nothing - unless connected $ - prompt $ void $ liftIO $ + unless connected $ do + ok <- prompt $ liftIO $ boolSystem "ssh" startps + unless ok $ + warning $ "Unable to run git-annex-shell on remote " ++ + Git.repoDescribe (gitConfigRepo (remoteGitConfig gc)) -- Parameters to get ssh connected to the remote host, -- by asking it to run a no-op command. @@ -16,6 +16,9 @@ git-annex (6.20170520) UNRELEASED; urgency=medium disable the usual automatic merge conflict resolution done by git-annex sync and the assistant. * sync: Added --no-resolvemerge option. + * Avoid error about git-annex-shell not being found when + syncing with -J with a git remote where git-annex-shell is not + installed. -- Joey Hess <id@joeyh.name> Wed, 24 May 2017 14:03:40 -0400 diff --git a/doc/bugs/bash__58___git-annex-shell__58___command_not_found/comment_1_461a8d85738d63f9d276bb33d5c24255._comment b/doc/bugs/bash__58___git-annex-shell__58___command_not_found/comment_1_461a8d85738d63f9d276bb33d5c24255._comment new file mode 100644 index 000000000..fda3bdf3c --- /dev/null +++ b/doc/bugs/bash__58___git-annex-shell__58___command_not_found/comment_1_461a8d85738d63f9d276bb33d5c24255._comment @@ -0,0 +1,27 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2017-06-06T16:21:53Z" + content=""" +One of the remotes of your repository is on a host +where git-annex-shell is either not installed, or perhaps +it is installed but `ssh thehost git-annex-shell` does not +work -- eg due to the problem decribed in +[[tips/get_git-annex-shell_into_PATH]]. + +There was indeed a change in 6.20170519 that explains why this +only happens in -J mode. [[!commit 6992fe133b37ec6d64498f3dd2c69613c4c37469]] +made it run git-annex-shell at startup in that mode. + +Hmm, I suppose one of your remotes could intentionally not have +git-annex-shell on it, and yet you'd still want `git annex sync` +to work to it, and so this message about git-annex-shell +being displayed is not ideal. + +So, I've made it skip trying to run git-annex-shell in this case unless +the remote has an annex-uuid set. If the remote has never had +git-annex-shell installed, it can't have an annex-uuid set. + +And, when it does fail to run git-annex-shell, I've made it say which +remote it was unable to run it on. +"""]] |