D1378: bundlerepo: assign bundle attributes in bundle type blocks

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Mon Nov 13 12:06:13 EST 2017

indygreg added inline comments.


> dlax wrote in bundlerepo.py:298
> Within `_handlebundle2part`, there's still a `self._bundle = changegroup.getunbundler(...)` statement. Perhaps, it'd be even clearer if this method would `return changegroup.getunbundler(...)` and let the caller eventually assign this as an attribute.

Yes, this API would be cleaner.

The reason I hesitated is `_handlebundle2part()` is generic. It feels weird to return a changegroup unpacker from such a generic method.

Since I'm incurring an API break in this series anyway and since treemanifests is the only thing extending this code AFAICT, I may just refactor things further.

  rHG Mercurial


To: indygreg, #hg-reviewers, dlax
Cc: mercurial-devel

More information about the Mercurial-devel mailing list