# HG changeset patch # User Pierre-Yves David # Date 1335275791 -7200 # Node ID ea4aa1890b1620ac4e42f1575b044a57abb657f5 # Parent cd9407400ced9cf5426b00eb7b785a62c5517e9b obsolete: add an extinct property on context diff -r cd9407400ced -r ea4aa1890b16 hgext/obsolete.py --- 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 #############################