path environment variables and ssh
Christian Ebert
blacktrash at gmx.net
Thu May 8 12:04:42 UTC 2008
* James Walker on Wednesday, May 07, 2008 at 19:30:22 -0700
> Hi. I'm new to mercurial, and I haven't been able to figure out where
> to define environment variables such that they will be seen by an ssh
> remote command to a server running Mac OS X 10.4. For instance it's not
> ~/.profile, which works if I log in interactively. This caused a
> mercurial command with an ssh URL to fail because it couldn't find hg on
> the server. I got around that problem by using my local .hgrc file to
> set the remote command to /usr/local/bin/hg. But now I'm wondering
> about the PYTHONPATH. If the server's hg were using python 2.3.5 (which
> comes standard with Mac OS X 10.4) rather than python 2.5.1 (which I
> installed), would there be an error message, or would it just run
> suboptimally?
I believe what you want can be done in hgweb(dir).cgi.
I force the use of Python 2.5 over the Mac shipped Python by
changing the bang in hgwebdir.cgi to point to the 2.5 executable:
#!/usr/local/bin/python
This has the advantage that you don't have to fiddle with
$PYTHONPATH for the server.
If you look at hgweb(dir).cgi you'll see also how you can change
environment vars, and even $PYTHONPATH.
c
--
Patch queue to improve Mercurial's handling of non-ascii chars in mails:
<http://www.blacktrash.org/hg/hg-mail-mq/>
Mercurial crew repo, with mail improvement patch queue applied:
<http://www.blacktrash.org/hg/hg-crew-mq/>
More information about the Mercurial
mailing list