[PATCH 2 of 9 V2] tests: update test-context.py to use diffopts as diff argument
Boris Feld
boris.feld at octobus.net
Thu Jul 5 22:26:00 UTC 2018
# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1529756783 -3600
# Sat Jun 23 13:26:23 2018 +0100
# Node ID 5041da43ac2ac8cd7930d2aba612bca09741d6ed
# Parent a8ab7fcf8de8c3ad51787ea345a7c194d4c94421
# EXP-Topic diff-cleanup
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 5041da43ac2a
tests: update test-context.py to use diffopts as diff argument
diff --git a/tests/test-context.py b/tests/test-context.py
--- a/tests/test-context.py
+++ b/tests/test-context.py
@@ -10,6 +10,7 @@ from mercurial import (
scmutil,
ui as uimod,
)
+from mercurial.utils import diffutil
print_ = print
def print(*args, **kwargs):
@@ -76,8 +77,8 @@ ctxb = context.memctx(repo, [ctxa.node()
print(ctxb.status(ctxa))
# test performing a diff on a memctx
-
-for d in ctxb.diff(ctxa, opts={'git': True}):
+diffopts = diffutil.diffopts(repo.ui, {'git': True})
+for d in ctxb.diff(ctxa, opts=diffopts):
printb(d, end=b'')
# test safeness and correctness of "ctx.status()"
More information about the Mercurial-devel
mailing list