Mercurial > evolve
changeset 2839:f9c8c754a528
context: troubled was deprecated
Use isunstable instead.
Match 52c5ff856b49ac8f2a4eadda6dc9dbb070f39a3f mercurial changeset.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 11 Aug 2017 09:32:23 +0200 |
parents | 1c9150e30b28 |
children | dfad30be866c |
files | hgext3rd/evolve/compat.py hgext3rd/topic/stack.py |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/compat.py Thu Aug 10 20:40:57 2017 +0200 +++ b/hgext3rd/evolve/compat.py Fri Aug 11 09:32:23 2017 +0200 @@ -104,6 +104,9 @@ if not util.safehasattr(context.basectx, 'phasedivergent'): context.basectx.phasedivergent = context.basectx.bumped +if not util.safehasattr(context.basectx, 'isunstable'): + context.basectx.isunstable = context.basectx.troubled + if not util.safehasattr(revset, 'orphan'): @eh.revset('orphan') def oprhanrevset(*args, **kwargs):
--- a/hgext3rd/topic/stack.py Thu Aug 10 20:40:57 2017 +0200 +++ b/hgext3rd/topic/stack.py Fri Aug 11 09:32:23 2017 +0200 @@ -19,6 +19,9 @@ if not util.safehasattr(context.basectx, 'orphan'): context.basectx.orphan = context.basectx.unstable +if not util.safehasattr(context.basectx, 'isunstable'): + context.basectx.isunstable = context.basectx.troubled + def getstack(repo, branch=None, topic=None): # XXX need sorting if topic is not None and branch is not None: @@ -178,7 +181,7 @@ data = {} revs = getstack(repo, branch, topic)[1:] data['changesetcount'] = len(revs) - data['troubledcount'] = len([r for r in revs if repo[r].troubled()]) + data['troubledcount'] = len([r for r in revs if repo[r].isunstable()]) deps, rdeps = builddependencies(repo, revs) data['headcount'] = len([r for r in revs if not rdeps[r]]) data['behindcount'] = 0