This is an archive of the discontinued Mercurial Phabricator instance.

upgrade: add support for experimental safe share mode
ClosedPublic

Authored by pulkit on Oct 2 2020, 9:22 AM.

Details

Summary

Recently we introduce the share-safe functionality which makes shares share
requirements and config of share source. This patch adds support to
debugupgraderepo command to upgrade repository to share-safe mode when
format.exp-share-safe config is enabled.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

pulkit created this revision.Oct 2 2020, 9:22 AM
pulkit updated this revision to Diff 23061.Oct 6 2020, 9:51 AM
pulkit updated this revision to Diff 23258.Oct 16 2020, 4:02 AM
marmoute requested changes to this revision.Oct 16 2020, 6:42 AM
marmoute added a subscriber: marmoute.
marmoute added inline comments.
mercurial/upgrade.py
355–357

Upgrades the shared source and current shared repository '

Can we upgrade share ? I though it wasn't possible ? And it is probably safer to deny any upgrade from a share.

to use safe method of sharing which will make requirements '
and configs being shared.'

Maybe clarify this using. It makes shares inherit repository requirement and configuration from its source.

What do you think ?

1462–1464

Could have have old share automatically pick up the source requirements and move to share safe mode ? That would seems safer.

tests/test-share-safe.t
298–299

We need to test that downgrading is working too.

This revision now requires changes to proceed.Oct 16 2020, 6:42 AM
pulkit added inline comments.Oct 16 2020, 9:16 AM
mercurial/upgrade.py
355–357

Oh, this message is wrong. Updating it in next version.

1462–1464

They will be required to re-shared. Also I am not sure if we have a way to list all the shares of the current repository.

tests/test-share-safe.t
298–299

Will add a patch after this one for that functionality.

marmoute added inline comments.Oct 16 2020, 12:14 PM
mercurial/upgrade.py
1462–1464

We don't so we will not be perfect here.

pulkit marked 2 inline comments as done.Nov 21 2020, 8:21 AM
pulkit added inline comments.
mercurial/upgrade.py
1462–1464

This one is not yet done, will add patch in end of series based on our recent discussion.

tests/test-share-safe.t
298–299

Added downgrade functionality and related tests in D9358.

pulkit marked an inline comment as done.Nov 27 2020, 7:23 AM
pulkit added inline comments.
mercurial/upgrade.py
1462–1464

Added D9369 to warn outdated shares.

mharbison72 accepted this revision.Dec 2 2020, 12:35 PM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.