Thanks to Yuya for suggesting this in D1173.
Details
- Reviewers
yuja - Group Reviewers
hg-reviewers - Commits
- rHGf56a30b844aa: rebase: use fm.formatlist() and fm.formatdict() to support user template
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
Can you add a test that should be fixed by this patch?
Perhaps that will show we'll probably want to set the name of dict item pair
other than the default 'key'/'value'.
hgext/rebase.py | ||
---|---|---|
1550 | The name argument is for each item, not for the list. Perhaps, |
I have added a test. I am not sure whether that was what you wanted.
(Fun fact: I was trying various permutations of {nodechanges % ":{value % ...}"} and gave up last night. When I quoted your comment to say I am unable to come up with a case, I saw you had {key} in your comment too which was invisible. )
I am not sure whether that was what you wanted.
It's getting closer, thanks. What I meant is {key} and {value} wouldn't be good
keyword names because the they are actually an old node and a list of new nodes
respectively.
I think a template should be expressed something like this:
`{oldnode}: {newnodes % '{node} '}`
The name argument is for each item, not for the list. Perhaps,
it should be name='node' (or name ='succ').