Rich Freeman <rich0 <at> gentoo.org> writes:

> I used pygit2, but there are a few different implenentations and
> plenty of docs online in general.


Just emerged this one. thx.


> Here is an example program that runs through a history and dumps a
> list of commits and their metadata in csv format:
> https://github.com/rich0/gitvalidate/blob/master/gitdump/parsetrees.py

very nice. I'll have to noodle around a bit with this script and
see what I came up with.



> There are some other scripts that retrieve blobs and manipulate them
> in the same directory.  This was part of the validation of the git
> migration, which uses a map-reduce algorithm to diff every single
> commit in a git history and identify all file revisions (which creates
> a cvs-like per-file history which can then be compared with results
> obtained from parsing a cvs repository for the same information).  The
> only single-threaded step in the process is walking the list of
> commits - all the diffs can be highly paralleled.

There use to be a central repo for many of the common gentoo admin scripts,
any idea where it is now that things have move to github?
(https://code.google.com/archive/p/genscripts/source)

I think there were others. The reason I like those, particularly for
new learning like python, is you get to see good and robust scripting
styles from the gentoo devs. Really helps when learning something new,
even if you have to figure out why things are written in a certain way.


> I doubt you need anything quite so fancy.  As you can see from the
> script pulling metadata out of commits and walking through parents is
> pretty easy.

ipython is some thing I want to learn by experimentation.


> My example doesn't account for merge commits.  There weren't any in
> the cvs->git migration.  Obviously walking commits with merges will
> get a lot messier.

I do not think I need 'merge commits' for one offs, that is pulling
old codes into a development system.  Later on, when I get more aggressive,
pulling old codes to run on gentoo cluster, I might pester the list seeking
more advice.


Thanks for the help, and encouragement,
James







Reply via email to