tests/test-context.py
changeset 21837 61b333b982ea
parent 21836 232038a05fdb
child 23060 4eaea93b3e5b
equal deleted inserted replaced
21836:232038a05fdb 21837:61b333b982ea
    39     if f == 'foo':
    39     if f == 'foo':
    40         data += 'bar\n'
    40         data += 'bar\n'
    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