This is an archive of the discontinued Mercurial Phabricator instance.

localrepo: add a pinnedrevs attribute
ClosedPublic

Authored by pulkit on Oct 17 2017, 8:18 AM.

Details

Summary

We have repoview.pinnedrevs() which take a repository object and returns the
hidden revisions which should not be filtered. To add more hidden revisions to
prevent them from getting obsoleted, we need to wrap the pinnedrevs function.

This patch adds repo.pinnedrevs which can be updated with the revisions which
needs to be prevented from being filtered. After this patch
repoview.pinnedrevs() updates repo.pinnedrevs and returns it.

The functionality to add commits to pinnedrevs without wrapping the function
will be very helpful is adding support for accessing hidden commits.

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.Oct 17 2017, 8:18 AM
dlax added a subscriber: dlax.Oct 17 2017, 3:09 PM
indygreg accepted this revision.Oct 18 2017, 12:11 PM
This revision is now accepted and ready to land.Oct 18 2017, 12:11 PM
This revision was automatically updated to reflect the committed changes.

We're dropping this stack from 4.4 because it caused unexpected behavior changes in python-hglib (https://buildbot.mercurial-scm.org/builders/python-hglib/builds/654) and elsewhere. Seems to stem from recomputing from the same set on repeated calls to repoview.pinnedrevs().