D6753: contrib: simplify the genosxversion.py command to find the hg libraries
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Sun Aug 25 16:09:29 UTC 2019
Closed by commit rHG197e7326b8b8: contrib: simplify the genosxversion.py command to find the hg libraries (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D6753?vs=16287&id=16313
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D6753/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D6753
AFFECTED FILES
contrib/genosxversion.py
CHANGE DETAILS
diff --git a/contrib/genosxversion.py b/contrib/genosxversion.py
--- a/contrib/genosxversion.py
+++ b/contrib/genosxversion.py
@@ -2,14 +2,13 @@
from __future__ import absolute_import, print_function
import argparse
-import json
import os
import subprocess
import sys
# Always load hg libraries from the hg we can find on $PATH.
-hglib = json.loads(subprocess.check_output(
- ['hg', 'debuginstall', '-Tjson']))[0]['hgmodules']
+hglib = subprocess.check_output(
+ ['hg', 'debuginstall', '-T', '{hgmodules}'])
sys.path.insert(0, os.path.dirname(hglib))
from mercurial import util
To: mharbison72, #hg-reviewers, indygreg
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list