Show More
@@ -30,3 +30,19 b' ctx.commit()' | |||||
30 | for enc in "ASCII", "Latin-1", "UTF-8": |
|
30 | for enc in "ASCII", "Latin-1", "UTF-8": | |
31 | encoding.encoding = enc |
|
31 | encoding.encoding = enc | |
32 | print "%-8s: %s" % (enc, repo["tip"].description()) |
|
32 | print "%-8s: %s" % (enc, repo["tip"].description()) | |
|
33 | ||||
|
34 | # test performing a status | |||
|
35 | ||||
|
36 | def getfilectx(repo, memctx, f): | |||
|
37 | fctx = memctx.parents()[0][f] | |||
|
38 | data, flags = fctx.data(), fctx.flags() | |||
|
39 | if f == 'foo': | |||
|
40 | data += 'bar\n' | |||
|
41 | return context.memfilectx(repo, f, data, 'l' in flags, 'x' in flags) | |||
|
42 | ||||
|
43 | ctxa = repo.changectx(0) | |||
|
44 | ctxb = context.memctx(repo, [ctxa.node(), None], | |||
|
45 | "test diff", | |||
|
46 | ["foo"], getfilectx) | |||
|
47 | ||||
|
48 | print ctxb.status(ctxa) |
General Comments 0
You need to be logged in to leave comments.
Login now