This is an archive of the discontinued Mercurial Phabricator instance.

setdiscovery: use revsets for computing a subset's heads and roots
ClosedPublic

Authored by indygreg on Aug 17 2018, 5:31 PM.

Details

Summary

revlogdag.headsetofconnecteds() obtains the set of DAG heads in a
given set of revs.

revlogdag.inverse() inverts the DAG order and makes
headsetofconnecteds() obtain the DAG roots in a given subset.

Both of these can be expressed with a revset.

Like other patches in this series, revlogdag uses revlog.index
and thus doesn't take filtering into account. Revsets do. So there
is a chance for regressions with this change. But no tests fail.
And I think this code should take filtering into account since
hidden changesets shouldn't factor into discovery (unless operating
on the hidden repository).

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.