equal
deleted
inserted
replaced
8 encoding, |
8 encoding, |
9 hg, |
9 hg, |
10 scmutil, |
10 scmutil, |
11 ui as uimod, |
11 ui as uimod, |
12 ) |
12 ) |
|
13 from mercurial.utils import diffutil |
13 |
14 |
14 print_ = print |
15 print_ = print |
15 def print(*args, **kwargs): |
16 def print(*args, **kwargs): |
16 """print() wrapper that flushes stdout buffers to avoid py3 buffer issues |
17 """print() wrapper that flushes stdout buffers to avoid py3 buffer issues |
17 |
18 |
74 getfilectx, ctxa.user(), ctxa.date()) |
75 getfilectx, ctxa.user(), ctxa.date()) |
75 |
76 |
76 print(ctxb.status(ctxa)) |
77 print(ctxb.status(ctxa)) |
77 |
78 |
78 # test performing a diff on a memctx |
79 # test performing a diff on a memctx |
79 |
80 diffopts = diffutil.diffopts(repo.ui, {'git': True}) |
80 for d in ctxb.diff(ctxa, opts={'git': True}): |
81 for d in ctxb.diff(ctxa, opts=diffopts): |
81 printb(d, end=b'') |
82 printb(d, end=b'') |
82 |
83 |
83 # test safeness and correctness of "ctx.status()" |
84 # test safeness and correctness of "ctx.status()" |
84 print('= checking context.status():') |
85 print('= checking context.status():') |
85 |
86 |