Mercurial > hg
comparison mercurial/util.py @ 13128:dbc546811dd6 stable
util: work around behavior change in Python 2.7.1
author | Steve Borho <steve@borho.org> |
---|---|
date | Mon, 13 Dec 2010 11:51:01 -0600 |
parents | adff480db558 |
children | 873c032c81b5 6c9345f9edca |
comparison
equal
deleted
inserted
replaced
13125:a1a7da34e7c2 | 13128:dbc546811dd6 |
---|---|
389 return '0' | 389 return '0' |
390 if val is True: | 390 if val is True: |
391 return '1' | 391 return '1' |
392 return str(val) | 392 return str(val) |
393 origcmd = cmd | 393 origcmd = cmd |
394 if os.name == 'nt': | 394 if os.name == 'nt' and sys.version_info < (2, 7, 1): |
395 # Python versions since 2.7.1 do this extra quoting themselves | |
395 cmd = '"%s"' % cmd | 396 cmd = '"%s"' % cmd |
396 env = dict(os.environ) | 397 env = dict(os.environ) |
397 env.update((k, py2shell(v)) for k, v in environ.iteritems()) | 398 env.update((k, py2shell(v)) for k, v in environ.iteritems()) |
398 env['HG'] = hgexecutable() | 399 env['HG'] = hgexecutable() |
399 if out is None: | 400 if out is None: |