hgext3rd/evolve/templatekw.py
branchmercurial-4.0
changeset 3003 ddf28837f5af
parent 2701 26ec0839865b
parent 2926 1abafae41fe2
--- a/hgext3rd/evolve/templatekw.py	Tue Jul 25 15:17:52 2017 +0200
+++ b/hgext3rd/evolve/templatekw.py	Wed Sep 27 01:18:39 2017 +0200
@@ -28,7 +28,7 @@
 
 @eh.templatekw('obsolete')
 def obsoletekw(repo, ctx, templ, **args):
-    """:obsolete: String. Whether the changeset is ``obsolete``.
+    """String. Whether the changeset is ``obsolete``.
     """
     if ctx.obsolete():
         return 'obsolete'
@@ -36,22 +36,22 @@
 
 @eh.templatekw('troubles')
 def showtroubles(**args):
-    """:troubles: List of strings. Evolution troubles affecting the changeset
+    """List of strings. Evolution troubles affecting the changeset
     (zero or more of "unstable", "divergent" or "bumped")."""
     ctx = args['ctx']
     try:
         # specify plural= explicitly to trigger TypeError on hg < 4.2
-        return templatekw.showlist('trouble', ctx.troubles(), args,
+        return templatekw.showlist('trouble', ctx.instabilities(), args,
                                    plural='troubles')
     except TypeError:
-        return templatekw.showlist('trouble', ctx.troubles(), plural='troubles',
+        return templatekw.showlist('trouble', ctx.instabilities(), plural='troubles',
                                    **args)
 
 def closestprecursors(repo, nodeid):
     """ Yield the list of next precursors pointing on visible changectx nodes
     """
 
-    precursors = repo.obsstore.precursors
+    precursors = repo.obsstore.predecessors
     stack = [nodeid]
 
     while stack:
@@ -138,8 +138,8 @@
     # Assemble them
     return {
         'obsfate_quiet': verbtempl + succtempl,
-        'obsfate': verbtempl + optionalusertempl + succtempl,
-        'obsfate_verbose': verbtempl + usertempl + succtempl + datetempl,
+        'obsfate': verbtempl + succtempl + optionalusertempl,
+        'obsfate_verbose': verbtempl + succtempl + usertempl + datetempl,
     }
 
 def obsfatedata(repo, ctx):