##// END OF EJS Templates
diffutil: remove diffopts() in favor of diffallopts()...
Yuya Nishihara -
r38606:b62000a2 default
parent child Browse files
Show More
@@ -196,7 +196,7 b' def analyze(ui, repo, *revs, **opts):'
196 196 if lastctx.rev() != nullrev:
197 197 timedelta = ctx.date()[0] - lastctx.date()[0]
198 198 interarrival[roundto(timedelta, 300)] += 1
199 diffopts = diffutil.diffopts(ui, {'git': True})
199 diffopts = diffutil.diffallopts(ui, {'git': True})
200 200 diff = sum((d.splitlines()
201 201 for d in ctx.diff(pctx, opts=diffopts)), [])
202 202 fileadds, diradds, fileremoves, filechanges = 0, 0, 0, 0
@@ -395,7 +395,7 b' def _cmpdiff(leftctx, rightctx):'
395 395
396 396 This is a first and basic implementation, with many shortcoming.
397 397 """
398 diffopts = diffutil.diffopts(leftctx.repo().ui, {'git': True})
398 diffopts = diffutil.diffallopts(leftctx.repo().ui, {'git': True})
399 399 # Leftctx or right ctx might be filtered, so we need to use the contexts
400 400 # with an unfiltered repository to safely compute the diff
401 401 leftunfi = leftctx._repo.unfiltered()[leftctx.rev()]
@@ -2233,7 +2233,7 b' def changedfiles(ui, repo, patchpath, st'
2233 2233 class GitDiffRequired(Exception):
2234 2234 pass
2235 2235
2236 diffopts = diffutil.diffopts
2236 diffopts = diffutil.diffallopts
2237 2237 diffallopts = diffutil.diffallopts
2238 2238 difffeatureopts = diffutil.difffeatureopts
2239 2239
@@ -1805,7 +1805,7 b' def matching(repo, subset, x):'
1805 1805 'substate': lambda r: repo[r].substate,
1806 1806 'summary': lambda r: repo[r].description().splitlines()[0],
1807 1807 'diff': lambda r: list(repo[r].diff(
1808 opts=diffutil.diffopts(repo.ui, {'git': True}))),
1808 opts=diffutil.diffallopts(repo.ui, {'git': True}))),
1809 1809 }
1810 1810 for info in fields:
1811 1811 getfield = _funcs.get(info, None)
@@ -265,7 +265,7 b' def showdiffstat(context, mapping):'
265 265 """
266 266 ui = context.resource(mapping, 'ui')
267 267 ctx = context.resource(mapping, 'ctx')
268 diffopts = diffutil.diffopts(ui, {'noprefix': False})
268 diffopts = diffutil.diffallopts(ui, {'noprefix': False})
269 269 diff = ctx.diff(opts=diffopts)
270 270 stats = patch.diffstatdata(util.iterlines(diff))
271 271 maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats)
@@ -21,8 +21,6 b' def diffallopts(ui, opts=None, untrusted'
21 21 return difffeatureopts(ui, opts=opts, untrusted=untrusted, section=section,
22 22 git=True, whitespace=True, formatchanging=True)
23 23
24 diffopts = diffallopts
25
26 24 def difffeatureopts(ui, opts=None, untrusted=False, section='diff', git=False,
27 25 whitespace=False, formatchanging=False):
28 26 '''return diffopts with only opted-in features parsed
@@ -77,7 +77,7 b' ctxb = context.memctx(repo, [ctxa.node()'
77 77 print(ctxb.status(ctxa))
78 78
79 79 # test performing a diff on a memctx
80 diffopts = diffutil.diffopts(repo.ui, {'git': True})
80 diffopts = diffutil.diffallopts(repo.ui, {'git': True})
81 81 for d in ctxb.diff(ctxa, opts=diffopts):
82 82 printb(d, end=b'')
83 83
General Comments 0
You need to be logged in to leave comments. Login now