D6939: sidedata: apply basic but tight security around exchange

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Fri Oct 4 23:55:31 EDT 2019


martinvonz added inline comments.

INLINE COMMENTS

> bundle2.py:1837-1838
> +
> +    bundlesidedata = bool('exp-sidedata' in inpart.params)
> +    reposidedata = bool('exp-sidedata-flag' in op.repo.requirements)
> +    if reposidedata and not bundlesidedata:

Isn't `bool()` redundant here?

> bundle2.py:1840-1841
> +    if reposidedata and not bundlesidedata:
> +        msg = "repository is using sidedata but the bundle source do not"
> +        hint = 'this is currently unsupported'
> +        raise error.Abort(msg, hint=hint)

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

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6939/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6939

To: marmoute, #hg-reviewers
Cc: martinvonz, mercurial-devel


More information about the Mercurial-devel mailing list