[PATCH] repoview: extract hideable revision computation in a dedicated function
Augie Fackler
lists at durin42.com
Thu Jan 10 14:12:25 UTC 2013
queued, thanks
On Thu, Jan 10, 2013 at 4:44 AM, <pierre-yves.david at logilab.fr> wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at logilab.fr>
> # Date 1357809902 -3600
> # Node ID 034c5b46762bee1b902c4173152bf7bf1a42dbaf
> # Parent 0d5a22f73a1f8d7b871c51bc8426264e8c629ce4
> repoview: extract hideable revision computation in a dedicated function
>
> This will help extensions to plug into the hidden mechanism.
>
> diff --git a/mercurial/repoview.py b/mercurial/repoview.py
> --- a/mercurial/repoview.py
> +++ b/mercurial/repoview.py
> @@ -10,16 +10,22 @@ import copy
> import phases
> import util
> import obsolete, bookmarks, revset
>
>
> +def hideablerevs(repo):
> + """Revisions candidates to be hidden
> +
> + This is a standalone function to help extensions to wrap it."""
> + return obsolete.getrevs(repo, 'obsolete')
> +
> def computehidden(repo):
> """compute the set of hidden revision to filter
>
> During most operation hidden should be filtered."""
> assert not repo.changelog.filteredrevs
> - hideable = obsolete.getrevs(repo, 'obsolete')
> + hideable = hideablerevs(repo)
> if hideable:
> cl = repo.changelog
> firsthideable = min(hideable)
> revs = cl.revs(start=firsthideable)
> blockers = [r for r in revset._children(repo, revs, hideable)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20130110/528b3c70/attachment-0002.html>
More information about the Mercurial-devel
mailing list