I'm having difficulty figuring out how to clone my Mercurial repository from my local machine to the server. I actually found an answer to my question here (As the second part of #4.5 in http://mercurial.selenic.com/wiki/FAQ), but I don't know what to do with the answer.
On the other hand, if the error message is remote: bash: line 1: hg: command not found, the problem is that the environment used by ssh does not have hg in its PATH. There are two ways to deal with this problem:
In your ~/.hgrc file, set a remotecmd value in the [ui] section giving the exact path to hg. On the server, create a ~/.ssh/environment file that defines an appropriate PATH, and add PermitUserEnvironment yes to /etc/sshd_config.
I would like a clearer explanation of how to solve this problem BOTH ways. How does one find out the exact path of their Mercurial installation? What is an "appropriate PATH" to use on the server?