D4895: narrow: don't include manifests the client already has
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Tue Oct 16 20:17:56 UTC 2018
martinvonz planned changes to this revision.
martinvonz marked an inline comment as done.
martinvonz added inline comments.
INLINE COMMENTS
> pulkit wrote in changegroup.py:1056
> Also, I think this is not the right place to case this because not yielding these deltas will prevent the lookupfn being called and will result in tmfnodes being not updated correctly.
Fixed. I had not realized that `deltas` is a generator. Thanks for point that out.
> changegroup.py:1056
>
> - yield tree, deltas
> + if not self._oldfilematcher.visitdir(store.tree[:-1] or '.'):
> + yield tree, deltas
The name "_oldfilematcher" is a little ironic since it's not used for file (only directories). The reason that we don't consult it for files is that we get passed a differenecematcher when widening and the subtraction of files the client already has is done by that.
If we're making changegroup.generate() aware of widening like this patch does, perhaps we should make the caller not pass a differencematcher and we should instead check _oldfilematcher for files too. That would be more consistent and easier to understand. I guess there's not much reason not to do that, so I'll work on that (I'll update this patch).
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D4895
To: martinvonz, durin42, #hg-reviewers
Cc: pulkit, mercurial-devel
More information about the Mercurial-devel
mailing list