comparison mercurial/hg.py @ 36702:f659a407e5ee

py3: use util.forcebytestr instead of str to convert error messages Differential Revision: https://phab.mercurial-scm.org/D2649
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 04 Mar 2018 22:37:41 +0530
parents 0fe7e39dc683
children ffa3026d4196
comparison
equal deleted inserted replaced
36701:d77c3b023393 36702:f659a407e5ee
267 requirements += 'relshared\n' 267 requirements += 'relshared\n'
268 except (IOError, ValueError) as e: 268 except (IOError, ValueError) as e:
269 # ValueError is raised on Windows if the drive letters differ on 269 # ValueError is raised on Windows if the drive letters differ on
270 # each path 270 # each path
271 raise error.Abort(_('cannot calculate relative path'), 271 raise error.Abort(_('cannot calculate relative path'),
272 hint=str(e)) 272 hint=util.forcebytestr(e))
273 else: 273 else:
274 requirements += 'shared\n' 274 requirements += 'shared\n'
275 275
276 destvfs.write('requires', requirements) 276 destvfs.write('requires', requirements)
277 destvfs.write('sharedpath', sharedpath) 277 destvfs.write('sharedpath', sharedpath)