This is an archive of the discontinued Mercurial Phabricator instance.

changegroup: move file matcher from narrow extension
ClosedPublic

Authored by indygreg on Aug 1 2018, 1:03 PM.

Details

Summary

Sparse changegroup generation requires the use of a matcher to
filter which files are relevant.

This commit moves the file matcher from the narrow extension to core
and updates the narrow extension to use it.

I'm not sure why the narrow extension was storing the matcher as
a callable that resolved to a matcher. So I changed it to be a
simple matcher instance.

In addition, code from narrow to intersect the matcher with the local
narrow spec is now performed automatically when the changegroup
packer is created.

If a matcher is not passed into getbundler() an alwaysmatcher() is
assumed. This ensures that a matcher is always defined for all
operations.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Aug 1 2018, 1:03 PM

This one needs rebased

indygreg updated this revision to Diff 9746.Aug 1 2018, 5:04 PM

This one needs rebased

I ran hg rebase against @ and the 3-way merge "just worked." Limitations of our hg import based workflow, I suppose.

durin42 accepted this revision.Aug 1 2018, 7:27 PM
This revision is now accepted and ready to land.Aug 1 2018, 7:27 PM
This revision was automatically updated to reflect the committed changes.

Looks good, thanks for cleaning up! (I know it's already been queued.)