This is an archive of the discontinued Mercurial Phabricator instance.

scmutil: introduce filterrequirements() to split reqs into wc and store ones
ClosedPublic

Authored by pulkit on Aug 7 2020, 8:45 AM.

Details

Summary

In upcoming patches where we try to implement requirements in store, we will
need a mechanism to split all requirements on some basis and decide which one
goes to .hg/requires and which one goes to .hg/store/requires.

This patch introduce a separate function for that. Filtering logic for now is
put under an if False:. In upcoming patches it will be removed.

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

pulkit created this revision.Aug 7 2020, 8:45 AM
indygreg accepted this revision.Aug 8 2020, 1:17 PM
indygreg added a subscriber: indygreg.

I'm going to approve but will hold off landing until the following patch solidifies a bit.

This revision is now accepted and ready to land.Aug 8 2020, 1:17 PM
indygreg requested changes to this revision.Aug 24 2020, 8:42 PM
indygreg added inline comments.
mercurial/scmutil.py
1501

Since the presence or lack thereof of the requires file is important, I think we should change this to if x is not None so an empty file is written out if appropriate. This should happen, of course. But semantically it is the more correct behavior.

This revision now requires changes to proceed.Aug 24 2020, 8:42 PM
pulkit updated this revision to Diff 22443.Aug 25 2020, 7:38 AM
pulkit marked an inline comment as done.Aug 25 2020, 7:49 AM
indygreg accepted this revision.Aug 25 2020, 9:12 PM
This revision is now accepted and ready to land.Aug 25 2020, 9:12 PM