tests/test-context.py
changeset 41397 0bd56c291359
parent 38658 a75896bf5ccb
child 42056 4950ae4d034f
equal deleted inserted replaced
41396:3461814417f3 41397:0bd56c291359
    61     printb(b"%-8s: %s" % (enc.encode('ascii'), repo[b"tip"].description()))
    61     printb(b"%-8s: %s" % (enc.encode('ascii'), repo[b"tip"].description()))
    62 
    62 
    63 # test performing a status
    63 # test performing a status
    64 
    64 
    65 def getfilectx(repo, memctx, f):
    65 def getfilectx(repo, memctx, f):
    66     fctx = memctx.parents()[0][f]
    66     fctx = memctx.p1()[f]
    67     data, flags = fctx.data(), fctx.flags()
    67     data, flags = fctx.data(), fctx.flags()
    68     if f == b'foo':
    68     if f == b'foo':
    69         data += b'bar\n'
    69         data += b'bar\n'
    70     return context.memfilectx(
    70     return context.memfilectx(
    71         repo, memctx, f, data, b'l' in flags, b'x' in flags)
    71         repo, memctx, f, data, b'l' in flags, b'x' in flags)