Mercurial > hg
comparison mercurial/commands.py @ 42706:60789444acd6
config: fix fm.data() handling of defaultvalue
This is a follow-up patch to rHG51a2e3102db2. This moves
`fm.data()` out of the if block in `commands.config()`.
Differential Revision: https://phab.mercurial-scm.org/D6720
author | Navaneeth Suresh <navaneeths1998@gmail.com> |
---|---|
date | Wed, 07 Aug 2019 19:18:20 +0530 |
parents | 049b2ac3252e |
children | 66048f6b5d0d |
comparison
equal
deleted
inserted
replaced
42705:049b2ac3252e | 42706:60789444acd6 |
---|---|
1880 if values and not (section in selsections or entryname in selentries): | 1880 if values and not (section in selsections or entryname in selentries): |
1881 continue | 1881 continue |
1882 fm.startitem() | 1882 fm.startitem() |
1883 fm.condwrite(ui.debugflag, 'source', '%s: ', source) | 1883 fm.condwrite(ui.debugflag, 'source', '%s: ', source) |
1884 if uniquesel: | 1884 if uniquesel: |
1885 fm.data(name=entryname, defaultvalue=defaultvalue) | 1885 fm.data(name=entryname) |
1886 fm.write('value', '%s\n', value) | 1886 fm.write('value', '%s\n', value) |
1887 else: | 1887 else: |
1888 fm.write('name value', '%s=%s\n', entryname, value) | 1888 fm.write('name value', '%s=%s\n', entryname, value) |
1889 fm.data(defaultvalue=defaultvalue) | |
1889 matched = True | 1890 matched = True |
1890 fm.end() | 1891 fm.end() |
1891 if matched: | 1892 if matched: |
1892 return 0 | 1893 return 0 |
1893 return 1 | 1894 return 1 |