from mercurial import ui context localrepo hgui ui ui localrepo localr

1
2
3
4
5
6
7
8
9
>>> from mercurial import ui, context, localrepo
>>> hgui = ui.ui()
>>> r = localrepo.localrepository(hgui, '.')
>>> def getfilectx(repo, memctx, path): return context.memfilectx(path, path, False, False, False)
...
>>> msg = 'just test'
>>> ctx = context.memctx(r, ('tip', None), msg, ('first', ), getfilectx)
>>> r.commitctx(ctx)
'\xe0\xbd\xdd\xfeT\x05\x1d\xc4\x12\x82+\xf8\xfa1>\\\xd0}=\xdd'