Hi Adrien,

On Wed, Jul 17, 2013 at 06:05:51PM +0200, Adrien Saladin wrote:
> I need to retrieve the last revision id of a given file (ie the
> equivalent of git log -n1 filename). But I can't find how to do this
> with dulwich.
You can use the graph walker to do this. See Repository.get_walker().

http://www.samba.org/~jelmer/dulwich/apidocs/dulwich.repo.BaseRepo.html#get_walker

Note that this will scan the history (just like "git log -n1" will) because
git does not explicitly store information about in what revision a file was
last changed.

Cheers,

Jelmer

_______________________________________________
Mailing list: https://launchpad.net/~dulwich-users
Post to     : dulwich-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dulwich-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to