diff mercurial/patch.py @ 27401:186f2afe9919

patch: disable nobinary when HGPLAIN=1 The diff output without binaries is definitely great for interactive users - a binary patch is not meaningful for them. Although setting diff.nobinary flag can break the automation. Let's force full output for automation.
author Mateusz Kwapich <mitrandir@fb.com>
date Thu, 17 Dec 2015 11:00:06 -0800
parents 8d3c5797a175
children 14b184263846
line wrap: on
line diff
--- a/mercurial/patch.py	Thu Dec 17 22:29:41 2015 +0900
+++ b/mercurial/patch.py	Thu Dec 17 11:00:06 2015 -0800
@@ -2146,7 +2146,7 @@
                                             'ignoreblanklines')
     if formatchanging:
         buildopts['text'] = opts and opts.get('text')
-        buildopts['nobinary'] = get('nobinary')
+        buildopts['nobinary'] = get('nobinary', forceplain=False)
         buildopts['noprefix'] = get('noprefix', forceplain=False)
 
     return mdiff.diffopts(**buildopts)