[issue2650] when used with recent sudo, hg doesn't read original hgrc
Antoine Pitrou
bugs at mercurial.selenic.com
Fri Feb 18 18:15:09 UTC 2011
New submission from Antoine Pitrou <pitrou at free.fr>:
hg is often used to manage system directories such as /etc. In that
situation, you need to use "sudo" because of course casual users don't have
the required access rights.
The problem is that on latest Debian stable (and perhaps other systems),
sudo doesn't preserve HOME anymore. Thus hg takes the root user's hgrc file,
which is not the desired behaviour. The only workaroud I've found is to use
"sudo -E", but it's quite easy to forget about it (and then e.g. commit with
the wrong username).
Perhaps hg could look at environment variable SUDO_USER and look at that
user's hgrc if it exists?
----------
messages: 15318
nosy: pitrou
priority: wish
status: unread
title: when used with recent sudo, hg doesn't read original hgrc
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2650>
____________________________________________________
More information about the Mercurial-devel
mailing list