##// END OF EJS Templates
contrib: simplify the genosxversion.py command to find the hg libraries...
Matt Harbison -
r43080:197e7326 default
parent child Browse files
Show More
@@ -2,14 +2,13 b''
2 from __future__ import absolute_import, print_function
2 from __future__ import absolute_import, print_function
3
3
4 import argparse
4 import argparse
5 import json
6 import os
5 import os
7 import subprocess
6 import subprocess
8 import sys
7 import sys
9
8
10 # Always load hg libraries from the hg we can find on $PATH.
9 # Always load hg libraries from the hg we can find on $PATH.
11 hglib = json.loads(subprocess.check_output(
10 hglib = subprocess.check_output(
12 ['hg', 'debuginstall', '-Tjson']))[0]['hgmodules']
11 ['hg', 'debuginstall', '-T', '{hgmodules}'])
13 sys.path.insert(0, os.path.dirname(hglib))
12 sys.path.insert(0, os.path.dirname(hglib))
14
13
15 from mercurial import util
14 from mercurial import util
General Comments 0
You need to be logged in to leave comments. Login now