comparison mercurial/upgrade.py @ 48440:cb477edeca79 stable

upgrade: byteify a few error messages These were flagged by pytype (which is currently disabled on this file due to another failure). Differential Revision: https://phab.mercurial-scm.org/D11905
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 12 Dec 2021 19:36:11 -0500
parents 16c18d5e5dc8
children 9dd151a39950
comparison
equal deleted inserted replaced
48437:6e4999cb085e 48440:cb477edeca79
276 current_requirements.add(requirementsmod.SHARESAFE_REQUIREMENT) 276 current_requirements.add(requirementsmod.SHARESAFE_REQUIREMENT)
277 scmutil.writerequires(hgvfs, diffrequires) 277 scmutil.writerequires(hgvfs, diffrequires)
278 ui.warn(_(b'repository upgraded to use share-safe mode\n')) 278 ui.warn(_(b'repository upgraded to use share-safe mode\n'))
279 except error.LockError as e: 279 except error.LockError as e:
280 hint = _( 280 hint = _(
281 "see `hg help config.format.use-share-safe` for more information" 281 b"see `hg help config.format.use-share-safe` for more information"
282 ) 282 )
283 if mismatch_config == b'upgrade-abort': 283 if mismatch_config == b'upgrade-abort':
284 raise error.Abort( 284 raise error.Abort(
285 _(b'failed to upgrade share, got error: %s') 285 _(b'failed to upgrade share, got error: %s')
286 % stringutil.forcebytestr(e.strerror), 286 % stringutil.forcebytestr(e.strerror),
333 current_requirements -= set(requirementsmod.SHARESAFE_REQUIREMENT) 333 current_requirements -= set(requirementsmod.SHARESAFE_REQUIREMENT)
334 scmutil.writerequires(hgvfs, current_requirements) 334 scmutil.writerequires(hgvfs, current_requirements)
335 ui.warn(_(b'repository downgraded to not use share-safe mode\n')) 335 ui.warn(_(b'repository downgraded to not use share-safe mode\n'))
336 except error.LockError as e: 336 except error.LockError as e:
337 hint = _( 337 hint = _(
338 "see `hg help config.format.use-share-safe` for more information" 338 b"see `hg help config.format.use-share-safe` for more information"
339 ) 339 )
340 # If upgrade-abort is set, abort when upgrade fails, else let the 340 # If upgrade-abort is set, abort when upgrade fails, else let the
341 # process continue as `upgrade-allow` is set 341 # process continue as `upgrade-allow` is set
342 if mismatch_config == b'downgrade-abort': 342 if mismatch_config == b'downgrade-abort':
343 raise error.Abort( 343 raise error.Abort(