##// END OF EJS Templates
context: also accept diff option directly...
Boris Feld -
r38540:c1a7bbf9 default
parent child Browse files
Show More
@@ -30,6 +30,7 from . import (
30 error,
30 error,
31 fileset,
31 fileset,
32 match as matchmod,
32 match as matchmod,
33 mdiff,
33 obsolete as obsmod,
34 obsolete as obsmod,
34 patch,
35 patch,
35 pathutil,
36 pathutil,
@@ -302,7 +303,11 class basectx(object):
302 ctx2 = self.p1()
303 ctx2 = self.p1()
303 if ctx2 is not None:
304 if ctx2 is not None:
304 ctx2 = self._repo[ctx2]
305 ctx2 = self._repo[ctx2]
305 diffopts = patch.diffopts(self._repo.ui, opts)
306
307 if isinstance(opts, mdiff.diffopts):
308 diffopts = opts
309 else:
310 diffopts = patch.diffopts(self._repo.ui, opts)
306 return patch.diff(self._repo, ctx2, self, match=match, changes=changes,
311 return patch.diff(self._repo, ctx2, self, match=match, changes=changes,
307 opts=diffopts, losedatafn=losedatafn, prefix=prefix,
312 opts=diffopts, losedatafn=losedatafn, prefix=prefix,
308 relroot=relroot, copy=copy,
313 relroot=relroot, copy=copy,
General Comments 0
You need to be logged in to leave comments. Login now