[PATCH 3 of 3] reachableroots: use smartset min
Augie Fackler
raf at durin42.com
Thu Aug 27 16:35:32 CDT 2015
On Thu, Aug 27, 2015 at 12:25:28PM -0700, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at fb.com>
> # Date 1440198744 25200
> # Fri Aug 21 16:12:24 2015 -0700
> # Node ID 04cae949223aef6aad5b2bddb2bb34f0973ee590
> # Parent df0a203aa014a3afe3e4c4aa5fc9033e65fcb8c9
> reachableroots: use smartset min
queued this, many thanks
>
> smartset min are likely to be optimised, cached or other magical property.
>
> diff --git a/mercurial/revset.py b/mercurial/revset.py
> --- a/mercurial/revset.py
> +++ b/mercurial/revset.py
> @@ -133,11 +133,11 @@ def reachableroots(repo, roots, heads, i
> If includepath is True, return (<roots>::<heads>)."""
> if not roots:
> return baseset()
> # XXX this should be 'parentset.min()' assuming 'parentset' is a smartset
> # (and if it is not, it should.)
> - minroot = min(roots)
> + minroot = roots.min()
> roots = list(roots)
> heads = list(heads)
> try:
> return repo.changelog.reachableroots(minroot, heads, roots, includepath)
> except AttributeError:
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list