comparison mercurial/configitems.py @ 41560:66399f2e92aa

commit: if interactive, look elsewhere for whitespace settings (BC) Previously, when doing `commit -i`, we respected `diff.ignorews` and other whitespace-related settings, which is probably unexpected. The primary reason for this is to support hgext.record's commandline options, it's probably accidental that the `[diff]` settings were also considered. See comments on issue6042 and D5490. This can cause problems (issue5839, issue6042). It is assumed by the author that the `[diff]` section is primarily for *viewing* diffs, and that it is unlikely what people intend when attempting to commit or revert. With this change, if a user wants the behavior, they can clone their `[diff]` settings to `commands.commit.interactive.<setting>`. This is thus a mild BC change, but one I suspect is not going to be relied on by anyone. Note: while doing a partial commit/revert, we do not know what command the user is actually running. This means that the split extension, which ends up calling into this code, will respect the `commands.commit.interactive.<setting>` settings, and not a hypothetical `commands.split.interactive.<setting>`. This *also* means that setting `commands.commit.interactive.ignoreblanklines`, for example, will still cause issue5839. Considering the highly unlikely chance that a user actually sets `commands.commit.interactive.<setting>`, the author deems this risk acceptable. Differential Revision: https://phab.mercurial-scm.org/D5834
author Kyle Lippincott <spectral@google.com>
date Thu, 31 Jan 2019 14:47:34 -0800
parents 901ebc81ffb3
children aec185af621e
comparison
equal deleted inserted replaced
41559:78b270a55dc6 41560:66399f2e92aa
199 default='auto', 199 default='auto',
200 ) 200 )
201 coreconfigitem('color', 'pagermode', 201 coreconfigitem('color', 'pagermode',
202 default=dynamicdefault, 202 default=dynamicdefault,
203 ) 203 )
204 _registerdiffopts(section='commands', configprefix='commit.interactive.')
204 coreconfigitem('commands', 'grep.all-files', 205 coreconfigitem('commands', 'grep.all-files',
205 default=False, 206 default=False,
206 ) 207 )
207 coreconfigitem('commands', 'resolve.confirm', 208 coreconfigitem('commands', 'resolve.confirm',
208 default=False, 209 default=False,
211 default=False, 212 default=False,
212 ) 213 )
213 coreconfigitem('commands', 'resolve.mark-check', 214 coreconfigitem('commands', 'resolve.mark-check',
214 default='none', 215 default='none',
215 ) 216 )
217 _registerdiffopts(section='commands', configprefix='revert.interactive.')
216 coreconfigitem('commands', 'show.aliasprefix', 218 coreconfigitem('commands', 'show.aliasprefix',
217 default=list, 219 default=list,
218 ) 220 )
219 coreconfigitem('commands', 'status.relative', 221 coreconfigitem('commands', 'status.relative',
220 default=False, 222 default=False,