( )⚙ D6939 sidedata: apply basic but tight security around exchange

This is an archive of the discontinued Mercurial Phabricator instance.

sidedata: apply basic but tight security around exchange
ClosedPublic

Authored by marmoute on Oct 1 2019, 12:07 PM.

Details

Summary

We don't currently have code to deal with exchange between repository using
sidedata and repository not using sidedata. Until we implement such code (eg:
dropping side data when pushing to a non-sidedata repo) we prevent the two kind
of repo to speak to each other. This is somewhere similar to what 'treemanifest'
does.

Note that sidedata exchange is broken unless one use changegroup v3 anyway. See
next changeset for details.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

marmoute created this revision.Oct 1 2019, 12:07 PM
marmoute updated this revision to Diff 16771.Oct 2 2019, 12:08 AM
martinvonz added inline comments.
mercurial/bundle2.py
1837–1838

Isn't bool() redundant here?

1840–1841

Need b'' prefix, I think (also pick one type of quotes maybe? but maybe Black will soon change this anyway...)

martinvonz added inline comments.Oct 4 2019, 11:59 PM
mercurial/bundle2.py
1840–1841

Never mind... I've just gotten used to looking at extension code where the source transformer is not run. It is run on this code, of course, so this is correct as is.

indygreg added inline comments.
mercurial/bundle2.py
2343

Shouldn't this by exp-sidedata?

marmoute updated this revision to Diff 16943.Oct 7 2019, 8:36 PM
marmoute marked an inline comment as done.Oct 7 2019, 8:51 PM
marmoute added inline comments.
mercurial/bundle2.py
1837–1838

It is redundant, but helping Raphaël work on Rust got me scared about boolean. I'll clean it up (either resend or followup)

2343

Hum, yeah. That would be safer. Updated code coming

marmoute marked an inline comment as done.Oct 9 2019, 12:45 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.