D6310: narrow: send specs as bundle2 data instead of param (issue5952) (issue6019)

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Wed Apr 24 22:17:33 EDT 2019

indygreg added a comment.

  Ideally the new part would be documented in `internals.bundle2`. But other narrow parts aren't documented, so maybe we can hold off...


> narrowbundle2.py:160
> + at bundle2.parthandler('Narrowspec')
> +def _handlenarrowspecs(op, inpart):

I don't believe the part name is capitalized in the decorator. Instead, the part name is capitalized when the part is added to the bundle. Please change (if necessary) to be consistent with the rest of the world.

> narrowbundle2.py:170
> +
> +    if not repository.NARROW_REQUIREMENT in op.repo.requirements:
> +        op.repo.requirements.add(repository.NARROW_REQUIREMENT)

Nit: use `if x not in y`.

  rHG Mercurial


To: pulkit, durin42, martinvonz, #hg-reviewers
Cc: indygreg, idlsoft, mercurial-devel

More information about the Mercurial-devel mailing list