Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 10260:fe699ca08a45
templatekw: fix extras, manifest and showlist args (issue1989)
Removing the explicit parameters from keywords signature is easier than copying
and reproducing the original argument list.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 18 Jan 2010 22:59:32 +0100 |
parents | af24805aa37c |
children | d6512b3e9ac0 |
comparison
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 |