This is an archive of the discontinued Mercurial Phabricator instance.

localrepo: add a _pinnedrevs attribute
AbandonedPublic

Authored by pulkit on Oct 11 2017, 3:10 PM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
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
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

pulkit created this revision.Oct 11 2017, 3:10 PM
dlax added a subscriber: dlax.Oct 12 2017, 3:02 AM
dlax added inline comments.
mercurial/repoview.py
38

Updating a "private" attribute of an object outside the class is not nice.
Not sure about "our" common practice in this case, but maybe this could be handled through a property?

pulkit added inline comments.Oct 12 2017, 1:28 PM
mercurial/repoview.py
38

Hm, I will turn that attribute to public in next version.

pulkit abandoned this revision.Oct 17 2017, 8:22 AM

Resend the series as D1140 - D1144.