hg: set $HOME when not already set to avoid silly uid lookups which can fail if theres no /adm/users
This commit is contained in:
parent
66892eb133
commit
2ef975ae7d
1 changed files with 7 additions and 2 deletions
|
@ -22,12 +22,17 @@ import mercurial.util
|
|||
import mercurial.dispatch
|
||||
|
||||
if sys.platform == 'plan9':
|
||||
import os
|
||||
|
||||
home = os.environ['home']
|
||||
if not 'HOME' in os.environ:
|
||||
os.environ['HOME'] = home
|
||||
|
||||
def p9sys_rcpath():
|
||||
return ['/sys/lib/hgrc']
|
||||
|
||||
def p9usr_rcpath():
|
||||
import os
|
||||
return [os.environ['home']+'/lib/hgrc']
|
||||
return [home+'/lib/hgrc']
|
||||
|
||||
import mercurial.posix
|
||||
mercurial.posix.system_rcpath = p9sys_rcpath
|
||||
|
|
Loading…
Reference in a new issue