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

login
register
mail settings
Submitter Yuya Nishihara
Date July 6, 2018, 1:03 p.m.
Message ID <75f22f0f24a95921b0e4.1530882228@mimosa>
Download mbox | patch
Permalink /patch/32665/
State New
Headers show

Comments

Yuya Nishihara - July 6, 2018, 1:03 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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

Patch

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