D4784: streamclone: pass includes and excludes to stream_out wireprotocol cmd

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Mon Oct 1 17:22:29 UTC 2018


indygreg requested changes to this revision.
indygreg added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> streamclone.py:141
>      with remote.commandexecutor() as e:
> -        fp = e.callcommand('stream_out', {}).result()
> +        if narrowsupport:
> +            args = {}

I think we also want to make this conditional on a narrow stream clone actually being requested. i.e. don't send the arguments unless they have values.

> wireprotov1peer.py:412
>  
> -    def stream_out(self):
> -        return self._callstream('stream_out')
> +    def stream_out(self, includes=[], excludes=[]):
> +        i = wireprototypes.encodelist(includes)

Nit: don't use mutable values as default argument values.

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list