Mercurial > hg > mercurial-source
changeset 33369:47e4c6bb39f1
hidden: rename "revealedrevs" to "pinnedrevs" (API)
E.g. tags and bookmarks can reveal revisions that would otherwise be
hidden. A revision can also be revealed because one if its descendants
is visible. Let's use the term "pinned" for the former case
(bookmarks etc.).
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sat, 27 May 2017 21:08:51 -0700 |
parents | bceb398e6d72 |
children | b9b41d8f4522 |
files | hgext/rebase.py mercurial/repoview.py |
diffstat | 2 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -1537,4 +1537,4 @@ cmdutil.afterresolvedstates.append( ['rebasestate', _('hg rebase --continue')]) # ensure rebased rev are not hidden - extensions.wrapfunction(repoview, 'revealedrevs', _rebasedvisible) + extensions.wrapfunction(repoview, 'pinnedrevs', _rebasedvisible)
--- a/mercurial/repoview.py +++ b/mercurial/repoview.py @@ -28,21 +28,21 @@ lead to crashes.""" return obsolete.getrevs(repo, 'obsolete') -def revealedrevs(repo): +def pinnedrevs(repo): """revisions blocking hidden changesets from being filtered """ cl = repo.changelog - blockers = set() - blockers.update([par.rev() for par in repo[None].parents()]) - blockers.update([cl.rev(bm) for bm in repo._bookmarks.values()]) + pinned = set() + pinned.update([par.rev() for par in repo[None].parents()]) + pinned.update([cl.rev(bm) for bm in repo._bookmarks.values()]) tags = {} tagsmod.readlocaltags(repo.ui, repo, tags, {}) if tags: rev, nodemap = cl.rev, cl.nodemap - blockers.update(rev(t[0]) for t in tags.values() if t[0] in nodemap) - return blockers + pinned.update(rev(t[0]) for t in tags.values() if t[0] in nodemap) + return pinned def _consistencyblocker(pfunc, hideable, domain): """return non-hideable changeset blocking hideable one @@ -112,7 +112,7 @@ # check if we have wd parents, bookmarks or tags pointing to hidden # changesets and remove those. - blockers |= (hidden & revealedrevs(repo)) + blockers |= (hidden & pinnedrevs(repo)) if blockers: hidden = hidden - _domainancestors(pfunc, blockers, mutable) return frozenset(hidden)