# HG changeset patch # User Matt Mackall # Date 1275604780 18000 # Node ID a5eb0bf7e1581950a27e1f6e2ad3c50af9a49542 # Parent 62ccf4cd6e7ffc3831fbc5d0c6020e27de91d17f revset: add tagged predicate diff -r 62ccf4cd6e7f -r a5eb0bf7e158 mercurial/revset.py --- a/mercurial/revset.py Thu Jun 03 17:39:34 2010 -0500 +++ b/mercurial/revset.py Thu Jun 03 17:39:40 2010 -0500 @@ -424,6 +424,11 @@ print 'out', dest, o return [r for r in subset if r in o] +def tagged(repo, subset, x): + cl = repo.changelog + s = set([cl.rev(n) for t, n in repo.tagslist() if t != 'tip']) + return [r for r in subset if r in s] + symbols = { "ancestor": ancestor, "ancestors": ancestors, @@ -455,6 +460,7 @@ "adds": adds, "removes": removes, "outgoing": outgoing, + "tagged": tagged, } methods = {