Patchwork D6753: contrib: simplify the genosxversion.py command to find the hg libraries

login
register
mail settings
Submitter phabricator
Date Aug. 25, 2019, 4:09 p.m.
Message ID <0e60a74bd3a8a98c6365ed4470a62612@localhost.localdomain>
Download mbox | patch
Permalink /patch/41403/
State Not Applicable
Headers show

Comments

phabricator - Aug. 25, 2019, 4:09 p.m.
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




To: mharbison72, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

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