Mercurial > public > mercurial-scm > hg-stable
diff mercurial/patch.py @ 6467:65029a3aafc2
Let --unified default to diff.unified (issue 1076)
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Fri, 04 Apr 2008 22:15:14 +0200 |
parents | bace1990ab12 |
children | ac0bcd951c2c ba0b2dacc623 |
line wrap: on
line diff
--- a/mercurial/patch.py Thu Apr 03 13:14:43 2008 +0200 +++ b/mercurial/patch.py Fri Apr 04 22:15:14 2008 +0200 @@ -1055,9 +1055,9 @@ return err def diffopts(ui, opts={}, untrusted=False): - def get(key, name=None): + def get(key, name=None, getter=ui.configbool): return (opts.get(key) or - ui.configbool('diff', name or key, None, untrusted=untrusted)) + getter('diff', name or key, None, untrusted=untrusted)) return mdiff.diffopts( text=opts.get('text'), git=get('git'), @@ -1066,7 +1066,7 @@ ignorews=get('ignore_all_space', 'ignorews'), ignorewsamount=get('ignore_space_change', 'ignorewsamount'), ignoreblanklines=get('ignore_blank_lines', 'ignoreblanklines'), - context=get('unified')) + context=get('unified', getter=ui.config)) def updatedir(ui, repo, patches): '''Update dirstate after patch application according to metadata'''