This is an archive of the discontinued Mercurial Phabricator instance.

context: make workingctx.matches() filter our removed files (API)
ClosedPublic

Authored by martinvonz on Jun 11 2018, 1:38 PM.

Details

Summary

It seems surprising that workingctx.matches() includes files that had
been removed in the working copy. The callers don't want that either
(besides the hg locate that was changed in the previous patch).

The only observable difference that I'm aware of is that `hg log -T
'wdir()' -r '{files(...)}'` will no longer include removed files (an
improvement, IMO). That matches hg files (but does not match the
deprecated hg locate).

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

martinvonz created this revision.Jun 11 2018, 1:38 PM
yuja added a subscriber: yuja.Jun 12 2018, 8:06 AM
It seems surprising that workingctx.matches() includes files that had
been removed in the working copy. The callers don't want that either
(besides the `hg locate` that was changed in the previous patch).
The only observable difference that I'm aware of is that `hg log -T
'wdir()' -r '{files(...)}'` will no longer include removed files (an
improvement, IMO). That matches `hg files` (but does not match the
deprecated `hg locate`).

Queued the series, thanks.

FWIW, ctx.matches() vs ctx.walk() is one of the most obscure API I can't
say what is the right behavior. :-)

This revision was automatically updated to reflect the committed changes.