diff -r 5249ac2bc7a4 -r 4a58561ace0f mercurial/upgrade.py --- a/mercurial/upgrade.py Wed Jan 20 12:13:17 2021 +0100 +++ b/mercurial/upgrade.py Wed Jan 20 12:23:40 2021 +0100 @@ -282,15 +282,20 @@ scmutil.writerequires(hgvfs, diffrequires) ui.warn(_(b'repository upgraded to use share-safe mode\n')) except error.LockError as e: + hint = _( + "see `hg help config.format.use-share-safe` for more information" + ) if mismatch_config == b'upgrade-abort': raise error.Abort( _(b'failed to upgrade share, got error: %s') - % stringutil.forcebytestr(e.strerror) + % stringutil.forcebytestr(e.strerror), + hint=hint, ) elif mismatch_warn: ui.warn( _(b'failed to upgrade share, got error: %s\n') - % stringutil.forcebytestr(e.strerror) + % stringutil.forcebytestr(e.strerror), + hint=hint, ) finally: if wlock: @@ -334,17 +339,22 @@ scmutil.writerequires(hgvfs, current_requirements) ui.warn(_(b'repository downgraded to not use share-safe mode\n')) except error.LockError as e: + hint = _( + "see `hg help config.format.use-share-safe` for more information" + ) # If upgrade-abort is set, abort when upgrade fails, else let the # process continue as `upgrade-allow` is set if mismatch_config == b'downgrade-abort': raise error.Abort( _(b'failed to downgrade share, got error: %s') - % stringutil.forcebytestr(e.strerror) + % stringutil.forcebytestr(e.strerror), + hint=hint, ) elif mismatch_warn: ui.warn( _(b'failed to downgrade share, got error: %s\n') - % stringutil.forcebytestr(e.strerror) + % stringutil.forcebytestr(e.strerror), + hint=hint, ) finally: if wlock: