mercurial/cmdutil.py
changeset 10260 fe699ca08a45
parent 10250 af24805aa37c
child 10264 d6512b3e9ac0
equal deleted inserted replaced
10259:8a9651cb2836 10260:fe699ca08a45
   804 
   804 
   805         # showparents() behaviour depends on ui trace level which
   805         # showparents() behaviour depends on ui trace level which
   806         # causes unexpected behaviours at templating level and makes
   806         # causes unexpected behaviours at templating level and makes
   807         # it harder to extract it in a standalone function. Its
   807         # it harder to extract it in a standalone function. Its
   808         # behaviour cannot be changed so leave it here for now.
   808         # behaviour cannot be changed so leave it here for now.
   809         def showparents(repo, ctx, templ, **args):
   809         def showparents(**args):
       
   810             ctx = args['ctx']
   810             parents = [[('rev', p.rev()), ('node', p.hex())]
   811             parents = [[('rev', p.rev()), ('node', p.hex())]
   811                        for p in self._meaningful_parentrevs(ctx)]
   812                        for p in self._meaningful_parentrevs(ctx)]
   812             return showlist(templ, 'parent', parents, **args)
   813             return showlist('parent', parents, **args)
   813 
   814 
   814         props = props.copy()
   815         props = props.copy()
   815         props.update(templatekw.keywords)
   816         props.update(templatekw.keywords)
   816         props['parents'] = showparents
   817         props['parents'] = showparents
   817         props['templ'] = self.t
   818         props['templ'] = self.t