Mercurial > hg-stable
changeset 16963:c19113e842d3
tests/printenv.py: replace \ with / in output
saves us quite a bunch of (glob)'s
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Fri, 15 Jun 2012 19:59:36 +0200 |
parents | d2fe9aaedcaf |
children | eecaeeca2106 |
files | tests/printenv.py |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/printenv.py Fri Jun 15 18:56:16 2012 +0200 +++ b/tests/printenv.py Fri Jun 15 19:59:36 2012 +0200 @@ -32,13 +32,15 @@ # variables with empty values may not exist on all platforms, filter # them now for portability sake. -env = [k for k, v in os.environ.iteritems() +env = [(k, v) for k, v in os.environ.iteritems() if k.startswith("HG_") and v] env.sort() out.write("%s hook: " % name) -for v in env: - out.write("%s=%s " % (v, os.environ[v])) +for k, v in env: + if os.name == 'nt': + v = v.replace('\\', '/') + out.write("%s=%s " % (k, v)) out.write("\n") out.close()