Skip to content
Snippets Groups Projects
Commit 8fb54719f987 authored by Philippe Pepiot's avatar Philippe Pepiot
Browse files

Use environment defined in self.environ for ssh benchmarks

parent b502ed40b596
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
import errno
import os
import os.path
import pipes
import time
import timeit
import threading
......@@ -223,7 +224,9 @@
return [path]
elif self.repo_type == 'ssh':
with open('hg_wrapper', 'wb') as f:
f.write('#!/bin/sh\nexec env -i HGRCPATH= {} $*\n'.format(
f.write('#!/bin/sh\nexec env -i {} {} $*\n'.format(
' '.join(['{}={}'.format(k, pipes.quote(v))
for k, v in self.environ.items()]),
os.path.abspath(self.hgpath)))
st = os.stat('hg_wrapper')
os.chmod('hg_wrapper', st.st_mode | stat.S_IEXEC)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment