##// END OF EJS Templates
setup: move environment computation into a helper function...
Adam Simpkins -
r33112:155d760d default
parent child Browse files
Show More
@@ -165,20 +165,23 b' def runhg(cmd, env):'
165 165 return ''
166 166 return out
167 167
168 version = ''
169 168
170 # Execute hg out of this directory with a custom environment which takes care
171 # to not use any hgrc files and do no localization.
172 env = {'HGMODULEPOLICY': 'py',
173 'HGRCPATH': '',
174 'LANGUAGE': 'C',
175 'PATH': ''} # make pypi modules that use os.environ['PATH'] happy
176 if 'LD_LIBRARY_PATH' in os.environ:
177 env['LD_LIBRARY_PATH'] = os.environ['LD_LIBRARY_PATH']
178 if 'SystemRoot' in os.environ:
179 # SystemRoot is required by Windows to load various DLLs. See:
180 # https://bugs.python.org/issue13524#msg148850
181 env['SystemRoot'] = os.environ['SystemRoot']
169 def gethgenv():
170 # Execute hg out of this directory with a custom environment which takes
171 # care to not use any hgrc files and do no localization.
172 env = {'HGMODULEPOLICY': 'py',
173 'HGRCPATH': '',
174 'LANGUAGE': 'C',
175 'PATH': ''} # make pypi modules that use os.environ['PATH'] happy
176 if 'LD_LIBRARY_PATH' in os.environ:
177 env['LD_LIBRARY_PATH'] = os.environ['LD_LIBRARY_PATH']
178 if 'SystemRoot' in os.environ:
179 # SystemRoot is required by Windows to load various DLLs. See:
180 # https://bugs.python.org/issue13524#msg148850
181 env['SystemRoot'] = os.environ['SystemRoot']
182
183 env = gethgenv()
184 version = ''
182 185
183 186 if os.path.isdir('.hg'):
184 187 cmd = [sys.executable, 'hg', 'log', '-r', '.', '--template', '{tags}\n']
General Comments 0
You need to be logged in to leave comments. Login now