tests/test-context.py
changeset 33865 af20468eb0a4
parent 33706 01a1c4e66816
parent 33751 3889cf955a62
child 35400 8a0cac20a1ad
equal deleted inserted replaced
33864:70354bd4f19b 33865:af20468eb0a4
    22 
    22 
    23 # add+commit 'foo'
    23 # add+commit 'foo'
    24 repo[None].add(['foo'])
    24 repo[None].add(['foo'])
    25 repo.commit(text='commit1', date="0 0")
    25 repo.commit(text='commit1', date="0 0")
    26 
    26 
       
    27 d = repo[None]['foo'].date()
    27 if os.name == 'nt':
    28 if os.name == 'nt':
    28     d = repo[None]['foo'].date()
    29     d = d[:2]
    29     print("workingfilectx.date = (%d, %d)" % (d[0], d[1]))
    30 print("workingfilectx.date = (%d, %d)" % d)
    30 else:
       
    31     print("workingfilectx.date =", repo[None]['foo'].date())
       
    32 
    31 
    33 # test memctx with non-ASCII commit message
    32 # test memctx with non-ASCII commit message
    34 
    33 
    35 def filectxfn(repo, memctx, path):
    34 def filectxfn(repo, memctx, path):
    36     return context.memfilectx(repo, "foo", "")
    35     return context.memfilectx(repo, "foo", "")