ref: 2ef975ae7d4174ae8aa46d4ff581adb5fd9867d9
parent: 66892eb133865ec02faa8e64cdfa2f867f9e1e87
author: cinap_lenrek <[email protected]>
date: Wed May 4 15:23:57 EDT 2016
hg: set $HOME when not already set to avoid silly uid lookups which can fail if theres no /adm/users
--- a/rc/bin/hg
+++ b/rc/bin/hg
@@ -22,12 +22,17 @@
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