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

Use local hg when using asv dev

When running "asv dev" there is no virtualenv managed by asv, so use the local
installation in ./mercurial
parent 5f4d909fe90b
No related branches found
No related tags found
No related merge requests found
......@@ -145,7 +145,13 @@
def setup(self, repo_name, *args, **kwargs):
venv = os.path.abspath(os.path.join(os.path.dirname(sys.executable), ".."))
self.repo_name = repo_name
self.hgpath = os.path.join(venv, "bin", "hg")
if os.path.isdir(os.path.join(venv, "project")):
# use hg in virtualenv for "asv run"
self.hgpath = os.path.join(venv, "bin", "hg")
else:
# use local hg for "asv dev"
sys.path.insert(0, os.path.join(BASEDIR, 'mercurial'))
self.hgpath = os.path.join(os.path.join(BASEDIR, 'mercurial', 'hg'))
self.repo_path = os.path.join(REPOS_DIR, self.repo_name)
# Use a clean environ to run command
......
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