--- a/mercurial/mdiff.py Sun Mar 26 20:54:50 2017 +0530
+++ b/mercurial/mdiff.py Sun Mar 26 20:58:21 2017 +0530
@@ -17,6 +17,7 @@
bdiff,
error,
mpatch,
+ pycompat,
util,
)
@@ -61,6 +62,7 @@
}
def __init__(self, **opts):
+ opts = pycompat.byteskwargs(opts)
for k in self.defaults.keys():
v = opts.get(k)
if v is None:
--- a/mercurial/patch.py Sun Mar 26 20:54:50 2017 +0530
+++ b/mercurial/patch.py Sun Mar 26 20:58:21 2017 +0530
@@ -2213,7 +2213,7 @@
buildopts['nobinary'] = get('nobinary', forceplain=False)
buildopts['noprefix'] = get('noprefix', forceplain=False)
- return mdiff.diffopts(**buildopts)
+ return mdiff.diffopts(**pycompat.strkwargs(buildopts))
def diff(repo, node1=None, node2=None, match=None, changes=None,
opts=None, losedatafn=None, prefix='', relroot='', copy=None):