Mercurial > hg > graal-jvmci-8
comparison mxtool/mx.py @ 13950:35783e78eaef
mx.run: shell-escape arguments when printing them in verbose mode
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Thu, 13 Feb 2014 17:07:36 +0100 |
parents | 91699ee4e4fa |
children | 392b6ac8da36 |
comparison
equal
deleted
inserted
replaced
13949:f694daada5bf | 13950:35783e78eaef |
---|---|
36 import sys, os, errno, time, subprocess, shlex, types, urllib2, contextlib, StringIO, zipfile, signal, xml.sax.saxutils, tempfile, fnmatch | 36 import sys, os, errno, time, subprocess, shlex, types, urllib2, contextlib, StringIO, zipfile, signal, xml.sax.saxutils, tempfile, fnmatch |
37 import textwrap | 37 import textwrap |
38 import socket | 38 import socket |
39 import xml.parsers.expat | 39 import xml.parsers.expat |
40 import shutil, re, xml.dom.minidom | 40 import shutil, re, xml.dom.minidom |
41 import pipes | |
41 from collections import Callable | 42 from collections import Callable |
42 from threading import Thread | 43 from threading import Thread |
43 from argparse import ArgumentParser, REMAINDER | 44 from argparse import ArgumentParser, REMAINDER |
44 from os.path import join, basename, dirname, exists, getmtime, isabs, expandvars, isdir, isfile | 45 from os.path import join, basename, dirname, exists, getmtime, isabs, expandvars, isdir, isfile |
45 | 46 |
1129 if _opts.verbose: | 1130 if _opts.verbose: |
1130 if _opts.very_verbose: | 1131 if _opts.very_verbose: |
1131 log('Environment variables:') | 1132 log('Environment variables:') |
1132 for key in sorted(env.keys()): | 1133 for key in sorted(env.keys()): |
1133 log(' ' + key + '=' + env[key]) | 1134 log(' ' + key + '=' + env[key]) |
1134 log(' '.join(args)) | 1135 log(' '.join(map(pipes.quote, args))) |
1135 | 1136 |
1136 if timeout is None and _opts.ptimeout != 0: | 1137 if timeout is None and _opts.ptimeout != 0: |
1137 timeout = _opts.ptimeout | 1138 timeout = _opts.ptimeout |
1138 | 1139 |
1139 global _currentSubprocess | 1140 global _currentSubprocess |