Mercurial > hg
changeset 23429:f35526b999f4
patch.diffopts: use a dict for initialization
In upcoming patches we'll conditionally add to and remove from the dict.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Tue, 18 Nov 2014 16:00:54 -0800 |
parents | b5e3f3d25395 |
children | 3821be85fd4d |
files | mercurial/patch.py |
diffstat | 1 files changed, 14 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/patch.py Fri Nov 21 22:24:45 2014 -0500 +++ b/mercurial/patch.py Tue Nov 18 16:00:54 2014 -0800 @@ -1568,17 +1568,20 @@ return forceplain return getter(section, name or key, None, untrusted=untrusted) - return mdiff.diffopts( - text=opts and opts.get('text'), - git=get('git'), - nodates=get('nodates'), - nobinary=get('nobinary'), - noprefix=get('noprefix', forceplain=False), - showfunc=get('show_function', 'showfunc'), - ignorews=get('ignore_all_space', 'ignorews'), - ignorewsamount=get('ignore_space_change', 'ignorewsamount'), - ignoreblanklines=get('ignore_blank_lines', 'ignoreblanklines'), - context=get('unified', getter=ui.config)) + buildopts = { + 'text': opts and opts.get('text'), + 'git': get('git'), + 'nodates': get('nodates'), + 'nobinary': get('nobinary'), + 'noprefix': get('noprefix', forceplain=False), + 'showfunc': get('show_function', 'showfunc'), + 'ignorews': get('ignore_all_space', 'ignorews'), + 'ignorewsamount': get('ignore_space_change', 'ignorewsamount'), + 'ignoreblanklines': get('ignore_blank_lines', 'ignoreblanklines'), + 'context': get('unified', getter=ui.config), + } + + return mdiff.diffopts(**buildopts) def diff(repo, node1=None, node2=None, match=None, changes=None, opts=None, losedatafn=None, prefix=''):