Mercurial > public > mercurial-scm > hg-stable
diff mercurial/patch.py @ 21790:3fbef7ac26f0
diff: add nobinary config to suppress git-style binary diffs
author | Stephen Lee <sphen.lee@gmail.com> |
---|---|
date | Sat, 21 Jun 2014 15:56:49 +1000 |
parents | 2a095d3442e0 |
children | c1ceec0c8cb4 |
line wrap: on
line diff
--- a/mercurial/patch.py Mon Jun 23 13:50:44 2014 -0500 +++ b/mercurial/patch.py Sat Jun 21 15:56:49 2014 +1000 @@ -1561,6 +1561,7 @@ text=opts and opts.get('text'), git=get('git'), nodates=get('nodates'), + nobinary=get('nobinary'), showfunc=get('show_function', 'showfunc'), ignorews=get('ignore_all_space', 'ignorews'), ignorewsamount=get('ignore_space_change', 'ignorewsamount'), @@ -1815,7 +1816,7 @@ if dodiff: if opts.git or revs: header.insert(0, diffline(join(a), join(b), revs)) - if dodiff == 'binary': + if dodiff == 'binary' and not opts.nobinary: text = mdiff.b85diff(to, tn) if text: addindexmeta(header, [gitindex(to), gitindex(tn)])