390 return templateutil.mappinggenerator(_succsandmarkersgen, args=(mapping,)) |
390 return templateutil.mappinggenerator(_succsandmarkersgen, args=(mapping,)) |
391 |
391 |
392 # teach templater succsandmarkers is switched to (context, mapping) API |
392 # teach templater succsandmarkers is switched to (context, mapping) API |
393 succsandmarkers._requires = {'repo', 'ctx'} |
393 succsandmarkers._requires = {'repo', 'ctx'} |
394 |
394 |
395 def whyunstable(context, mapping): |
395 def _whyunstablegen(context, mapping): |
396 repo = context.resource(mapping, 'repo') |
396 repo = context.resource(mapping, 'repo') |
397 ctx = context.resource(mapping, 'ctx') |
397 ctx = context.resource(mapping, 'ctx') |
398 |
398 |
399 entries = obsutil.whyunstable(repo, ctx) |
399 entries = obsutil.whyunstable(repo, ctx) |
400 for entry in entries: |
400 for entry in entries: |
401 if entry.get('divergentnodes'): |
401 if entry.get('divergentnodes'): |
402 entry['divergentnodes'] = _siblings(entry['divergentnodes']) |
402 entry['divergentnodes'] = _siblings(entry['divergentnodes']) |
403 yield entry |
403 yield entry |
|
404 |
|
405 def whyunstable(context, mapping): |
|
406 return templateutil.mappinggenerator(_whyunstablegen, args=(mapping,)) |
404 |
407 |
405 whyunstable._requires = {'repo', 'ctx'} |
408 whyunstable._requires = {'repo', 'ctx'} |
406 |
409 |
407 def commonentry(repo, ctx): |
410 def commonentry(repo, ctx): |
408 node = ctx.node() |
411 node = ctx.node() |