##// END OF EJS Templates
test-context: add test for performing a diff on a memctx...
Sean Farley -
r21837:61b333b9 default
parent child Browse files
Show More
@@ -41,8 +41,12 b' def getfilectx(repo, memctx, f):'
41 return context.memfilectx(repo, f, data, 'l' in flags, 'x' in flags)
41 return context.memfilectx(repo, f, data, 'l' in flags, 'x' in flags)
42
42
43 ctxa = repo.changectx(0)
43 ctxa = repo.changectx(0)
44 ctxb = context.memctx(repo, [ctxa.node(), None],
44 ctxb = context.memctx(repo, [ctxa.node(), None], "test diff", ["foo"],
45 "test diff",
45 getfilectx, ctxa.user(), ctxa.date())
46 ["foo"], getfilectx)
47
46
48 print ctxb.status(ctxa)
47 print ctxb.status(ctxa)
48
49 # test performing a diff on a memctx
50
51 for d in ctxb.diff(ctxa, git=True):
52 print d
@@ -3,3 +3,11 b' ASCII : Gr?ezi!'
3 Latin-1 : Gr�ezi!
3 Latin-1 : Gr�ezi!
4 UTF-8 : Grüezi!
4 UTF-8 : Grüezi!
5 (['foo'], [], [], [], [], [], [])
5 (['foo'], [], [], [], [], [], [])
6 diff --git a/foo b/foo
7
8 --- a/foo
9 +++ b/foo
10 @@ -1,1 +1,2 @@
11 foo
12 +bar
13
General Comments 0
You need to be logged in to leave comments. Login now