##// END OF EJS Templates
diff: use pycompat.{byteskwargs, strkwargs} to switch opts b/w bytes and str
Pulkit Goyal -
r31631:a7acda2d default
parent child Browse files
Show More
@@ -17,6 +17,7 b' from . import ('
17 bdiff,
17 bdiff,
18 error,
18 error,
19 mpatch,
19 mpatch,
20 pycompat,
20 util,
21 util,
21 )
22 )
22
23
@@ -61,6 +62,7 b' class diffopts(object):'
61 }
62 }
62
63
63 def __init__(self, **opts):
64 def __init__(self, **opts):
65 opts = pycompat.byteskwargs(opts)
64 for k in self.defaults.keys():
66 for k in self.defaults.keys():
65 v = opts.get(k)
67 v = opts.get(k)
66 if v is None:
68 if v is None:
@@ -2213,7 +2213,7 b' def difffeatureopts(ui, opts=None, untru'
2213 buildopts['nobinary'] = get('nobinary', forceplain=False)
2213 buildopts['nobinary'] = get('nobinary', forceplain=False)
2214 buildopts['noprefix'] = get('noprefix', forceplain=False)
2214 buildopts['noprefix'] = get('noprefix', forceplain=False)
2215
2215
2216 return mdiff.diffopts(**buildopts)
2216 return mdiff.diffopts(**pycompat.strkwargs(buildopts))
2217
2217
2218 def diff(repo, node1=None, node2=None, match=None, changes=None,
2218 def diff(repo, node1=None, node2=None, match=None, changes=None,
2219 opts=None, losedatafn=None, prefix='', relroot='', copy=None):
2219 opts=None, losedatafn=None, prefix='', relroot='', copy=None):
General Comments 0
You need to be logged in to leave comments. Login now