This is a follow-up patch to rHG51a2e3102db2. This moves
fm.data() out of the if block in commands.config().
Details
- Reviewers
pulkit - Group Reviewers
hg-reviewers - Commits
- rHG60789444acd6: config: fix fm.data() handling of defaultvalue
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
This patch also needs a better description, something like: config: fix fm.data() handling of defaultvalue.
mercurial/commands.py | ||
---|---|---|
1884 | A better fix will be to move fm.data(name=entryname) inside the if, i.e. where it was before https://phab.mercurial-scm.org/D6704. And add fm.data(defaultvalue=...) below the if-else which will also move the defaultvalue to last in json output. |
mercurial/commands.py | ||
---|---|---|
1884 | I did this but, couldn't see a difference in the test output. |
mercurial/commands.py | ||
---|---|---|
1884 | ah, I guess the output is sorted. Anyway, the suggested one is a correct way to do this, because otherwise we are writing name to fm two times in case of uniquesel. |
A better fix will be to move fm.data(name=entryname) inside the if, i.e. where it was before https://phab.mercurial-scm.org/D6704.
And add fm.data(defaultvalue=...) below the if-else which will also move the defaultvalue to last in json output.