Page MenuHomePhabricator

upgrade: add support to downgrade share safe mode
ClosedPublic

Authored by pulkit on Nov 21 2020, 8:07 AM.

Details

Summary

In previous patch we added support to upgrade current repository to use share
safe mode. This patch adds support to downgrade to remove share-safe mode.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pulkit created this revision.Nov 21 2020, 8:07 AM

I haven't followed all of the sharesafe stuff, but should the nonsharedhgrc be folded into the hgrc when downgrading or unsharing? I don't see that, at least in the unshare code.

Alphare added inline comments.
mercurial/upgrade.py
1479

Not sure what Re-share existing shares means. Is it a suggestion?

I haven't followed all of the sharesafe stuff, but should the nonsharedhgrc be folded into the hgrc when downgrading or unsharing? I don't see that, at least in the unshare code.

There is no need for that because whether the repository is shared or not, we always try to read hgrc-not-shared always. https://www.mercurial-scm.org/repo/hg-committed/file/default/mercurial/localrepo.py#l735

pulkit added inline comments.Nov 27 2020, 7:20 AM
mercurial/upgrade.py
1479

Yes, I will reword it so that it's clearer.

pulkit retitled this revision from upgrade: add support do downgrade share safe mode to upgrade: add support to downgrade share safe mode.Nov 27 2020, 10:41 AM
pulkit updated this revision to Diff 23715.
mharbison72 added inline comments.Dec 2 2020, 12:14 AM
mercurial/localrepo.py
568

Needs bytes?

mharbison72 accepted this revision.Dec 2 2020, 12:35 PM
This revision is now accepted and ready to land.Dec 2 2020, 12:35 PM
This revision was automatically updated to reflect the committed changes.