Skip to content
Snippets Groups Projects
Commit 148d177a4f2d authored by Augie Fackler's avatar Augie Fackler
Browse files

genosxversion: don't give up if we can't find a path to hg libraries

This doesn't work if you have a PyOxidized hg on $PATH, but everything
is fine if you just ignore that problem.

Differential Revision: https://phab.mercurial-scm.org/D8975
parent fc8299319ffe
Branches
Tags
No related merge requests found
......@@ -6,6 +6,7 @@
import subprocess
import sys
try:
# Always load hg libraries from the hg we can find on $PATH.
hglib = subprocess.check_output(['hg', 'debuginstall', '-T', '{hgmodules}'])
sys.path.insert(0, os.path.dirname(hglib))
......@@ -9,6 +10,10 @@
# Always load hg libraries from the hg we can find on $PATH.
hglib = subprocess.check_output(['hg', 'debuginstall', '-T', '{hgmodules}'])
sys.path.insert(0, os.path.dirname(hglib))
except subprocess.CalledProcessError:
# We're probably running with a PyOxidized Mercurial, so just
# proceed and hope it works out okay.
pass
from mercurial import util
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment