This is an archive of the discontinued Mercurial Phabricator instance.

localrepo: add a pinnedrevs attribute

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



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

rHG Mercurial
Automatic diff as part of commit; lint not applicable.
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 ( and elsewhere. Seems to stem from recomputing from the same set on repeated calls to repoview.pinnedrevs().