Give ssh a better chance of working on Windows.
Switch the type of quotes used for the remote command.
Open the pipe in binary mode.
abort: repository a/.hg not found!
255
requesting all changes
abort: error: Connection refused
255
abort: repository a/.hg not found!
255
abort: destination '../a' already exists
1
abort: repository a/.hg not found!
255
abort: destination 'q' already exists