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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

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
1978–1979

Isn't bool() redundant here?

1981–1982

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
1981–1982

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
2554

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
1978–1979

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

2554

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.