obsolete.py
changeset 41 99c131e97bb3
parent 40 b9a5a596d9ef
child 42 eb6a06d7eae3
equal deleted inserted replaced
40:b9a5a596d9ef 41:99c131e97bb3
    26 ohidden = context.changectx.hidden
    26 ohidden = context.changectx.hidden
    27 def hidden(ctx):
    27 def hidden(ctx):
    28     # hack to fill hiddenrevs
    28     # hack to fill hiddenrevs
    29     # compute hidden (XXX should move elsewhere)
    29     # compute hidden (XXX should move elsewhere)
    30     if not getattr(ctx._repo.changelog, 'hiddeninit', False):
    30     if not getattr(ctx._repo.changelog, 'hiddeninit', False):
    31         basicquery = 'obsolete() - (ancestors(not obsolete()))'
    31         basicquery = 'obsolete() - (ancestors(not obsolete() or . or bookmark()))'
    32         for rev in scmutil.revrange(ctx._repo, [basicquery]):
    32         for rev in scmutil.revrange(ctx._repo, [basicquery]):
    33             ctx._repo.changelog.hiddenrevs.add(rev)
    33             ctx._repo.changelog.hiddenrevs.add(rev)
    34         ctx._repo.changelog.hiddeninit = True
    34         ctx._repo.changelog.hiddeninit = True
    35 
    35 
    36     return ohidden(ctx)
    36     return ohidden(ctx)