I wondered if it would be sensible to ask to extend externals special remote protocol with ability for custom remotes to pass back some INFO level message (not only DEBUG or ERROR). The reason is: in datalad-archives special remote we usually need to git annex get
first the key containing the archive, which might be sizeable. Since there is ATM no way to communicate back to git-annex, so it could communicate back to the datalad which runs it, it results in no output/message to the user that possibly a heavy download is happening in the background. So, we would need to establish our own communication from datalad-archives special remote all the way to top level datalad process to report that, or I wondered if may be we could report back to git-annex, and it in turn report back to the original process (running e.g. annex get --json --json-progress
) so it could spit out that message wrapped into a json record within the stream, so we could process and output that to the user.
I've added it. However, note that previous versions of git-annex will not react well to an unknown message being sent, so to use it safely you will need to detect a new enough version of git-annex. (I've had a todo item on the protocol for a while to have a way to detect what messages git-annex understands.)
Great! I will give it a shot. No problem checking version of git-annex available so I will make it conditional on git-annex version.
As for "todo on protocol..." -- FWIW I left some comments close to original discussion