[PATCH 3 of 7] synthrepo: simply use the ui passed as a function argument

Yuya Nishihara yuya at tcha.org
Fri Jul 6 09:03:48 EDT 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1530880264 -32400
#      Fri Jul 06 21:31:04 2018 +0900
# Node ID 75f22f0f24a95921b0e4d8fce53a990f144a0b7b
# Parent  51201504373d536eafaab28693a3ca588318eb7c
synthrepo: simply use the ui passed as a function argument

diff --git a/contrib/synthrepo.py b/contrib/synthrepo.py
--- a/contrib/synthrepo.py
+++ b/contrib/synthrepo.py
@@ -196,7 +196,7 @@ 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})
+            diffopts = diffutil.diffopts(ui, {'git': True})
             diff = sum((d.splitlines()
                        for d in ctx.diff(pctx, opts=diffopts)), [])
             fileadds, diradds, fileremoves, filechanges = 0, 0, 0, 0


More information about the Mercurial-devel mailing list