petit git log paser

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

petit git log paser

Fabrizio Perin
Hi,
I will start to work on a parser to parse git logs. For now i will parer the info generated by "git log --stat". A full diff parser will came later.

If you have any suggestion or comment please ping me.

Cheers,
Fabrizio
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: petit git log paser

abergel
Are you sure there is no better way to extract the info? Apparently the .git folder does not contain much. Maybe there is a lower protocol to query a repository other than --stat

Alexandre


On 14 Oct 2011, at 07:47, Fabrizio Perin wrote:

> Hi,
> I will start to work on a parser to parse git logs. For now i will parer the info generated by "git log --stat". A full diff parser will came later.
>
> If you have any suggestion or comment please ping me.
>
> Cheers,
> Fabrizio
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: petit git log paser

Lukas Renggli
You could use GitFS and you already have objects containing everything.

Otherwise

     git log --pretty=oneline

or

     git log --pretty=raw

is likely simpler to parse.

Lukas

On 14 October 2011 13:36, Alexandre Bergel <[hidden email]> wrote:

> Are you sure there is no better way to extract the info? Apparently the .git folder does not contain much. Maybe there is a lower protocol to query a repository other than --stat
>
> Alexandre
>
>
> On 14 Oct 2011, at 07:47, Fabrizio Perin wrote:
>
>> Hi,
>> I will start to work on a parser to parse git logs. For now i will parer the info generated by "git log --stat". A full diff parser will came later.
>>
>> If you have any suggestion or comment please ping me.
>>
>> Cheers,
>> Fabrizio
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: petit git log paser

Fabrizio Perin
Sorry i don't see how can i evaluate the changes of a developer from something like this:

On 14 Oct 2011, at 14:07, Lukas Renggli wrote:

> You could use GitFS and you already have objects containing everything.
>
> Otherwise
>
>     git log --pretty=oneline

955d3eef3399b3c45a137b45fa13652fe4096e85 Comments only. Corrected comments. BTW: These functions do not belong in this class.
ff092263505fa12e5ad91a1428c267059d23f98f Switch heap display from currently allocated heap to max (possibly) available
ced9f3d3817bbbb569ef6f86b92df4429355c3ec Clean up Eclipse problem. easymock is not exported from argouml-app.
…….
>
> or
>
>     git log --pretty=raw

commit 61742d27f9f0687e7b56063905771ed3da8d4377
tree be005a56a5ef4db8e5ccb9ded4f4240a68c4226b
parent de74eaa32c6c24c574881866b47fa423ffa396d5
author linus <linus@a161b567-7d1e-0410-9ef9-912c70fedb3f> 1314734532 +0000
committer linus <linus@a161b567-7d1e-0410-9ef9-912c70fedb3f> 1314734532 +0000

    Updated the subclipse:tags tag.
   
    git-svn-id: http://argouml.tigris.org/svn/argouml/trunk@19697 a161b567-7d1e-0410-9ef9-912c70fedb3f




About GitFS i will take a look. Thanks a lot.

Cheers,
Fabrizio

>
> is likely simpler to parse.
>
> Lukas
>
> On 14 October 2011 13:36, Alexandre Bergel <[hidden email]> wrote:
>> Are you sure there is no better way to extract the info? Apparently the .git folder does not contain much. Maybe there is a lower protocol to query a repository other than --stat
>>
>> Alexandre
>>
>>
>> On 14 Oct 2011, at 07:47, Fabrizio Perin wrote:
>>
>>> Hi,
>>> I will start to work on a parser to parse git logs. For now i will parer the info generated by "git log --stat". A full diff parser will came later.
>>>
>>> If you have any suggestion or comment please ping me.
>>>
>>> Cheers,
>>> Fabrizio
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: petit git log paser

Lukas Renggli
On 14 October 2011 14:27, Fabrizio Perin <[hidden email]> wrote:
> Sorry i don't see how can i evaluate the changes of a developer from something like this:

Read "git log --help" and it tells you how you to build your own output format.

If you Google for it you can find examples where people customize
"--format" to generate XML, JSON, ... so that you could use an
existing parser.

Lukas

>
> On 14 Oct 2011, at 14:07, Lukas Renggli wrote:
>
>> You could use GitFS and you already have objects containing everything.
>>
>> Otherwise
>>
>>     git log --pretty=oneline
>
> 955d3eef3399b3c45a137b45fa13652fe4096e85 Comments only. Corrected comments. BTW: These functions do not belong in this class.
> ff092263505fa12e5ad91a1428c267059d23f98f Switch heap display from currently allocated heap to max (possibly) available
> ced9f3d3817bbbb569ef6f86b92df4429355c3ec Clean up Eclipse problem. easymock is not exported from argouml-app.
> …….
>>
>> or
>>
>>     git log --pretty=raw
>
> commit 61742d27f9f0687e7b56063905771ed3da8d4377
> tree be005a56a5ef4db8e5ccb9ded4f4240a68c4226b
> parent de74eaa32c6c24c574881866b47fa423ffa396d5
> author linus <linus@a161b567-7d1e-0410-9ef9-912c70fedb3f> 1314734532 +0000
> committer linus <linus@a161b567-7d1e-0410-9ef9-912c70fedb3f> 1314734532 +0000
>
>    Updated the subclipse:tags tag.
>
>    git-svn-id: http://argouml.tigris.org/svn/argouml/trunk@19697 a161b567-7d1e-0410-9ef9-912c70fedb3f
>
>
>
>
> About GitFS i will take a look. Thanks a lot.
>
> Cheers,
> Fabrizio
>
>>
>> is likely simpler to parse.
>>
>> Lukas
>>
>> On 14 October 2011 13:36, Alexandre Bergel <[hidden email]> wrote:
>>> Are you sure there is no better way to extract the info? Apparently the .git folder does not contain much. Maybe there is a lower protocol to query a repository other than --stat
>>>
>>> Alexandre
>>>
>>>
>>> On 14 Oct 2011, at 07:47, Fabrizio Perin wrote:
>>>
>>>> Hi,
>>>> I will start to work on a parser to parse git logs. For now i will parer the info generated by "git log --stat". A full diff parser will came later.
>>>>
>>>> If you have any suggestion or comment please ping me.
>>>>
>>>> Cheers,
>>>> Fabrizio
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>
>>
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: petit git log paser

abergel
In reply to this post by Fabrizio Perin
Thanks Lukas for your input!

Alexandre


On 14 Oct 2011, at 09:27, Fabrizio Perin wrote:

> Sorry i don't see how can i evaluate the changes of a developer from something like this:
>
> On 14 Oct 2011, at 14:07, Lukas Renggli wrote:
>
>> You could use GitFS and you already have objects containing everything.
>>
>> Otherwise
>>
>>    git log --pretty=oneline
>
> 955d3eef3399b3c45a137b45fa13652fe4096e85 Comments only. Corrected comments. BTW: These functions do not belong in this class.
> ff092263505fa12e5ad91a1428c267059d23f98f Switch heap display from currently allocated heap to max (possibly) available
> ced9f3d3817bbbb569ef6f86b92df4429355c3ec Clean up Eclipse problem. easymock is not exported from argouml-app.
> …….
>>
>> or
>>
>>    git log --pretty=raw
>
> commit 61742d27f9f0687e7b56063905771ed3da8d4377
> tree be005a56a5ef4db8e5ccb9ded4f4240a68c4226b
> parent de74eaa32c6c24c574881866b47fa423ffa396d5
> author linus <linus@a161b567-7d1e-0410-9ef9-912c70fedb3f> 1314734532 +0000
> committer linus <linus@a161b567-7d1e-0410-9ef9-912c70fedb3f> 1314734532 +0000
>
>    Updated the subclipse:tags tag.
>
>    git-svn-id: http://argouml.tigris.org/svn/argouml/trunk@19697 a161b567-7d1e-0410-9ef9-912c70fedb3f
>
>
>
>
> About GitFS i will take a look. Thanks a lot.
>
> Cheers,
> Fabrizio
>
>>
>> is likely simpler to parse.
>>
>> Lukas
>>
>> On 14 October 2011 13:36, Alexandre Bergel <[hidden email]> wrote:
>>> Are you sure there is no better way to extract the info? Apparently the .git folder does not contain much. Maybe there is a lower protocol to query a repository other than --stat
>>>
>>> Alexandre
>>>
>>>
>>> On 14 Oct 2011, at 07:47, Fabrizio Perin wrote:
>>>
>>>> Hi,
>>>> I will start to work on a parser to parse git logs. For now i will parer the info generated by "git log --stat". A full diff parser will came later.
>>>>
>>>> If you have any suggestion or comment please ping me.
>>>>
>>>> Cheers,
>>>> Fabrizio
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>
>>
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: petit git log paser

Fabrizio Perin
Yep thanks a lot Lukas. I will check.

Cheers,
Fabrizio

On 14 Oct 2011, at 15:26, Alexandre Bergel wrote:

> Thanks Lukas for your input!
>
> Alexandre
>
>
> On 14 Oct 2011, at 09:27, Fabrizio Perin wrote:
>
>> Sorry i don't see how can i evaluate the changes of a developer from something like this:
>>
>> On 14 Oct 2011, at 14:07, Lukas Renggli wrote:
>>
>>> You could use GitFS and you already have objects containing everything.
>>>
>>> Otherwise
>>>
>>>   git log --pretty=oneline
>>
>> 955d3eef3399b3c45a137b45fa13652fe4096e85 Comments only. Corrected comments. BTW: These functions do not belong in this class.
>> ff092263505fa12e5ad91a1428c267059d23f98f Switch heap display from currently allocated heap to max (possibly) available
>> ced9f3d3817bbbb569ef6f86b92df4429355c3ec Clean up Eclipse problem. easymock is not exported from argouml-app.
>> …….
>>>
>>> or
>>>
>>>   git log --pretty=raw
>>
>> commit 61742d27f9f0687e7b56063905771ed3da8d4377
>> tree be005a56a5ef4db8e5ccb9ded4f4240a68c4226b
>> parent de74eaa32c6c24c574881866b47fa423ffa396d5
>> author linus <linus@a161b567-7d1e-0410-9ef9-912c70fedb3f> 1314734532 +0000
>> committer linus <linus@a161b567-7d1e-0410-9ef9-912c70fedb3f> 1314734532 +0000
>>
>>   Updated the subclipse:tags tag.
>>
>>   git-svn-id: http://argouml.tigris.org/svn/argouml/trunk@19697 a161b567-7d1e-0410-9ef9-912c70fedb3f
>>
>>
>>
>>
>> About GitFS i will take a look. Thanks a lot.
>>
>> Cheers,
>> Fabrizio
>>
>>>
>>> is likely simpler to parse.
>>>
>>> Lukas
>>>
>>> On 14 October 2011 13:36, Alexandre Bergel <[hidden email]> wrote:
>>>> Are you sure there is no better way to extract the info? Apparently the .git folder does not contain much. Maybe there is a lower protocol to query a repository other than --stat
>>>>
>>>> Alexandre
>>>>
>>>>
>>>> On 14 Oct 2011, at 07:47, Fabrizio Perin wrote:
>>>>
>>>>> Hi,
>>>>> I will start to work on a parser to parse git logs. For now i will parer the info generated by "git log --stat". A full diff parser will came later.
>>>>>
>>>>> If you have any suggestion or comment please ping me.
>>>>>
>>>>> Cheers,
>>>>> Fabrizio
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel  http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>
>>>
>>>
>>> --
>>> Lukas Renggli
>>> www.lukas-renggli.ch
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: petit git log paser

Stéphane Ducasse
In reply to this post by Lukas Renggli
sounds cool that you can output your own format!
Excellent!
Stef

On Oct 14, 2011, at 2:37 PM, Lukas Renggli wrote:

> On 14 October 2011 14:27, Fabrizio Perin <[hidden email]> wrote:
>> Sorry i don't see how can i evaluate the changes of a developer from something like this:
>
> Read "git log --help" and it tells you how you to build your own output format.
>
> If you Google for it you can find examples where people customize
> "--format" to generate XML, JSON, ... so that you could use an
> existing parser.
>
> Lukas
>
>>
>> On 14 Oct 2011, at 14:07, Lukas Renggli wrote:
>>
>>> You could use GitFS and you already have objects containing everything.
>>>
>>> Otherwise
>>>
>>>     git log --pretty=oneline
>>
>> 955d3eef3399b3c45a137b45fa13652fe4096e85 Comments only. Corrected comments. BTW: These functions do not belong in this class.
>> ff092263505fa12e5ad91a1428c267059d23f98f Switch heap display from currently allocated heap to max (possibly) available
>> ced9f3d3817bbbb569ef6f86b92df4429355c3ec Clean up Eclipse problem. easymock is not exported from argouml-app.
>> …….
>>>
>>> or
>>>
>>>     git log --pretty=raw
>>
>> commit 61742d27f9f0687e7b56063905771ed3da8d4377
>> tree be005a56a5ef4db8e5ccb9ded4f4240a68c4226b
>> parent de74eaa32c6c24c574881866b47fa423ffa396d5
>> author linus <linus@a161b567-7d1e-0410-9ef9-912c70fedb3f> 1314734532 +0000
>> committer linus <linus@a161b567-7d1e-0410-9ef9-912c70fedb3f> 1314734532 +0000
>>
>>    Updated the subclipse:tags tag.
>>
>>    git-svn-id: http://argouml.tigris.org/svn/argouml/trunk@19697 a161b567-7d1e-0410-9ef9-912c70fedb3f
>>
>>
>>
>>
>> About GitFS i will take a look. Thanks a lot.
>>
>> Cheers,
>> Fabrizio
>>
>>>
>>> is likely simpler to parse.
>>>
>>> Lukas
>>>
>>> On 14 October 2011 13:36, Alexandre Bergel <[hidden email]> wrote:
>>>> Are you sure there is no better way to extract the info? Apparently the .git folder does not contain much. Maybe there is a lower protocol to query a repository other than --stat
>>>>
>>>> Alexandre
>>>>
>>>>
>>>> On 14 Oct 2011, at 07:47, Fabrizio Perin wrote:
>>>>
>>>>> Hi,
>>>>> I will start to work on a parser to parse git logs. For now i will parer the info generated by "git log --stat". A full diff parser will came later.
>>>>>
>>>>> If you have any suggestion or comment please ping me.
>>>>>
>>>>> Cheers,
>>>>> Fabrizio
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel  http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>
>>>
>>>
>>> --
>>> Lukas Renggli
>>> www.lukas-renggli.ch
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: petit git log paser

Fabrizio Perin
In reply to this post by Fabrizio Perin
That is cool Simon. If you can make it public I will surely play with it :)

Cheers,
Fabrizio

On 17 Oct 2011, at 16:30, Simon Denier wrote:

>
> On 14 oct. 2011, at 12:47, Fabrizio Perin wrote:
>
>> Hi,
>> I will start to work on a parser to parse git logs. For now i will parer the info generated by "git log --stat". A full diff parser will came later.
>>
>> If you have any suggestion or comment please ping me.
>
>
> Hi Fabrizio
>
> Just wanted to tell you that I wrote such a parser this summer, part time because I wanted to learn Petit Parser. However, it's still in the context of my work, so I have to check with my boss whether I can release it in the wild first.
>
> --
> Simon Denier
>
>
>


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev