comparison mercurial/diffutil.py @ 38591:be441eb65f09

diff: graduate word-diff option from experimental Per 4.6 Sprint notes. I've also made it gated by "formatchanging" since it could change the output if we had an option to highlight words without using colors.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 08 Jul 2018 16:21:26 +0900
parents 1c93e0237a24
children 78b270a55dc6
comparison
equal deleted inserted replaced
38590:f068495a1c28 38591:be441eb65f09
51 buildopts = { 51 buildopts = {
52 'nodates': get('nodates'), 52 'nodates': get('nodates'),
53 'showfunc': get('show_function', 'showfunc'), 53 'showfunc': get('show_function', 'showfunc'),
54 'context': get('unified', getter=ui.config), 54 'context': get('unified', getter=ui.config),
55 } 55 }
56 buildopts['worddiff'] = ui.configbool('experimental', 'worddiff')
57 buildopts['xdiff'] = ui.configbool('experimental', 'xdiff') 56 buildopts['xdiff'] = ui.configbool('experimental', 'xdiff')
58 57
59 if git: 58 if git:
60 buildopts['git'] = get('git') 59 buildopts['git'] = get('git')
61 60
99 buildopts['text'] = opts and opts.get('text') 98 buildopts['text'] = opts and opts.get('text')
100 binary = None if opts is None else opts.get('binary') 99 binary = None if opts is None else opts.get('binary')
101 buildopts['nobinary'] = (not binary if binary is not None 100 buildopts['nobinary'] = (not binary if binary is not None
102 else get('nobinary', forceplain=False)) 101 else get('nobinary', forceplain=False))
103 buildopts['noprefix'] = get('noprefix', forceplain=False) 102 buildopts['noprefix'] = get('noprefix', forceplain=False)
103 buildopts['worddiff'] = get('word_diff', 'word-diff', forceplain=False)
104 104
105 return mdiff.diffopts(**pycompat.strkwargs(buildopts)) 105 return mdiff.diffopts(**pycompat.strkwargs(buildopts))