Mercurial > public > mercurial-scm > hg
comparison contrib/synthrepo.py @ 38584:c6398fc2fc9c
synthrepo: simply use the ui passed as a function argument
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Fri, 06 Jul 2018 21:31:04 +0900 |
parents | 97469c5430cd |
children | b62000a28812 |
comparison
equal
deleted
inserted
replaced
38583:4bc96c755c17 | 38584:c6398fc2fc9c |
---|---|
194 else: | 194 else: |
195 lastctx = repo[rev - 1] | 195 lastctx = repo[rev - 1] |
196 if lastctx.rev() != nullrev: | 196 if lastctx.rev() != nullrev: |
197 timedelta = ctx.date()[0] - lastctx.date()[0] | 197 timedelta = ctx.date()[0] - lastctx.date()[0] |
198 interarrival[roundto(timedelta, 300)] += 1 | 198 interarrival[roundto(timedelta, 300)] += 1 |
199 diffopts = diffutil.diffopts(ctx._repo.ui, {'git': True}) | 199 diffopts = diffutil.diffopts(ui, {'git': True}) |
200 diff = sum((d.splitlines() | 200 diff = sum((d.splitlines() |
201 for d in ctx.diff(pctx, opts=diffopts)), []) | 201 for d in ctx.diff(pctx, opts=diffopts)), []) |
202 fileadds, diradds, fileremoves, filechanges = 0, 0, 0, 0 | 202 fileadds, diradds, fileremoves, filechanges = 0, 0, 0, 0 |
203 for filename, mar, lineadd, lineremove, isbin in parsegitdiff(diff): | 203 for filename, mar, lineadd, lineremove, isbin in parsegitdiff(diff): |
204 if isbin: | 204 if isbin: |