← Back to team overview

dulwich-users team mailing list archive

Re: retrieve the last revision id of a file

 

Thanks Jelmer, it worked very well.

Cheers,
Adrien

On Wed, Jul 17, 2013 at 6:13 PM, Jelmer Vernooij <jelmer@xxxxxxxxx> wrote:
> 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
>



-- 
PGP Key ID: 0x09203DC5


References