D4383: narrow: add server logic to send cg while widening without ellipsis

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Tue Aug 28 19:42:15 EDT 2018


martinvonz added inline comments.

INLINE COMMENTS

> narrowbundle2.py:77
> +
> +    if (oldinclude != include or oldexclude != exclude):
> +        common = repo.revs("::%ln", common)

replace by `assert` (if you agree with my suggestions further down)?

> narrowbundle2.py:84-85
> +        if commonnodes:
> +            # XXX: we should only send the filelogs (and treemanifest). user
> +            # already has the changelog and manifest
> +            packer = changegroup.getbundler(version, repo,

This is true when using ellipses as well (and the client probably has some of the filelogs too). I had imagined we'd introduce a new `widen` wire protocol command. That command would probably look at the `known` argument and would probably work the same for ellipsis or not (ellipsis-ness would be unchanged by the command). Then we will stop passing `oldincludepats`, `oldexcludepats`, and `known` to `getbundle`.

Perhaps `getbundlechangegrouppart_nonellipsis` can be renamed to `getbundlechangegrouppart_widen` already and then gradually evolve into a handler for the new command?

> narrowbundle2.py:319
>              getbundlechangegrouppart_narrow(*args, **kwargs)
> +        elif kwargs.get(r'widen', False) and kwargs.get(r'narrow', False):
> +            getbundlechangegrouppart_nonellipsis(*args, **kwargs)

Can we not infer `widen` from `oldincludepats, oldincludepats != includepats, excludepats`?

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list