get log from a repository

This is the first commit to get log from a repository and it is tested
by test code.