Comments
Patch
@@ -60,7 +60,10 @@ from mercurial import (
registrar,
scmutil,
)
-from mercurial.utils import dateutil
+from mercurial.utils import (
+ dateutil,
+ diffutil,
+)
# Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
# extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
@@ -196,8 +199,9 @@ def analyze(ui, repo, *revs, **opts):
if lastctx.rev() != nullrev:
timedelta = ctx.date()[0] - lastctx.date()[0]
interarrival[roundto(timedelta, 300)] += 1
+ diffopts = diffutil.diffopts(ctx._repo.ui, {'git': True})
diff = sum((d.splitlines()
- for d in ctx.diff(pctx, opts={'git': True})), [])
+ for d in ctx.diff(pctx, opts=diffopts)), [])
fileadds, diradds, fileremoves, filechanges = 0, 0, 0, 0
for filename, mar, lineadd, lineremove, isbin in parsegitdiff(diff):
if isbin: