Mercurial > evolve
changeset 213:ea4aa1890b16
obsolete: add an extinct property on context
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Tue, 24 Apr 2012 15:56:31 +0200 |
parents | cd9407400ced |
children | a140d1857931 |
files | hgext/obsolete.py |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/obsolete.py Tue Apr 24 15:58:19 2012 +0200 +++ b/hgext/obsolete.py Tue Apr 24 15:56:31 2012 +0200 @@ -125,6 +125,14 @@ context.changectx.unstable = unstable +def extinct(ctx): + """is the changeset extinct by other""" + if ctx.node() is None: + return False + return ctx.rev() in ctx._repo._extinctset + +context.changectx.extinct = extinct + ### revset #############################