Commit c1d8a5c6 authored by Pulkit Goyal's avatar Pulkit Goyal
Browse files

debugsharesafe: recommend from `debugupgraderepo` and `help -e share -v`

Recommending one debug command from another one sounds fine to me.

Also documentation about share-safe in `hg help -e share -v` was lacking correct
description on how upgrade existing shares. This fixes that and also start
mentioning about debugsharesafe.

Differential Revision: https://phab.mercurial-scm.org/D9571
parent fcaf13895656
Pipeline #15543 passed with stages
in 27 minutes and 51 seconds
......@@ -59,10 +59,9 @@ The following ``share.`` config options influence this feature:
requirements. This only applies to shares which are done after enabling
the config option.
For enabling this in existing shares, enable the config option and reshare.
For resharing existing shares, make sure your working directory is clean
and there are no untracked files, delete that share and create a new share.
For enabling this in existing shares, upgrade the shared-source using
`hg debugupgraderepo` and then upgrade shares using
`hg debugsharesafe --upgrade` command.
'''
from __future__ import absolute_import
......
......@@ -255,16 +255,17 @@ def upgraderepo(
ui.warn(
_(
b'repository upgraded to share safe mode, existing'
b' shares will still work in old non-safe mode. '
b'Re-share existing shares to use them in safe mode'
b' New shares will be created in safe mode.\n'
b' shares will still work in old non-safe mode.\n'
b'(Run `hg debugsharesafe --upgrade` in shares to '
b' update them to use share safe mode.)\n'
)
)
if upgrade_actions.sharesafe.name in removedreqs:
ui.warn(
_(
b'repository downgraded to not use share safe mode, '
b'existing shares will not work and needs to'
b' be reshared.\n'
b'existing shares will not work.\n(Run `hg '
b'debugsharesafe --downgrade` in shares '
b'to downgrade them.)\n'
)
)
......@@ -372,7 +372,8 @@ Upgrade
- changelog
- manifest
repository upgraded to share safe mode, existing shares will still work in old non-safe mode. Re-share existing shares to use them in safe mode New shares will be created in safe mode.
repository upgraded to share safe mode, existing shares will still work in old non-safe mode.
(Run `hg debugsharesafe --upgrade` in shares to update them to use share safe mode.)
$ hg debugrequirements
dotencode
......@@ -475,7 +476,8 @@ Test that downgrading works too
- changelog
- manifest
repository downgraded to not use share safe mode, existing shares will not work and needs to be reshared.
repository downgraded to not use share safe mode, existing shares will not work.
(Run `hg debugsharesafe --downgrade` in shares to downgrade them.)
$ hg debugrequirements
dotencode
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment