diff --git a/hgext/share.py b/hgext/share.py --- a/hgext/share.py +++ b/hgext/share.py @@ -59,10 +59,9 @@ 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 diff --git a/mercurial/upgrade.py b/mercurial/upgrade.py --- a/mercurial/upgrade.py +++ b/mercurial/upgrade.py @@ -309,16 +309,17 @@ 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' ) ) diff --git a/tests/test-share-safe.t b/tests/test-share-safe.t --- a/tests/test-share-safe.t +++ b/tests/test-share-safe.t @@ -372,7 +372,8 @@ - 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 @@ - 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