mercurial/util.py
changeset 36418 d26b0bedfaa4
parent 36415 0cb09c322647
child 36422 04c319a07c7b
equal deleted inserted replaced
36417:199443c55463 36418:d26b0bedfaa4
  1186         'convert python object into string that is useful to shell'
  1186         'convert python object into string that is useful to shell'
  1187         if val is None or val is False:
  1187         if val is None or val is False:
  1188             return '0'
  1188             return '0'
  1189         if val is True:
  1189         if val is True:
  1190             return '1'
  1190             return '1'
  1191         return str(val)
  1191         return pycompat.bytestr(val)
  1192     env = dict(encoding.environ)
  1192     env = dict(encoding.environ)
  1193     if environ:
  1193     if environ:
  1194         env.update((k, py2shell(v)) for k, v in environ.iteritems())
  1194         env.update((k, py2shell(v)) for k, v in environ.iteritems())
  1195     env['HG'] = hgexecutable()
  1195     env['HG'] = hgexecutable()
  1196     return env
  1196     return env