1 |
Rich Freeman <rich0 <at> gentoo.org> writes: |
2 |
|
3 |
|
4 |
> I used pygit2, but there are a few different implenentations and |
5 |
> plenty of docs online in general. |
6 |
|
7 |
|
8 |
Just emerged this one. thx. |
9 |
|
10 |
|
11 |
> Here is an example program that runs through a history and dumps a |
12 |
> list of commits and their metadata in csv format: |
13 |
> https://github.com/rich0/gitvalidate/blob/master/gitdump/parsetrees.py |
14 |
|
15 |
very nice. I'll have to noodle around a bit with this script and |
16 |
see what I came up with. |
17 |
|
18 |
|
19 |
|
20 |
> There are some other scripts that retrieve blobs and manipulate them |
21 |
> in the same directory. This was part of the validation of the git |
22 |
> migration, which uses a map-reduce algorithm to diff every single |
23 |
> commit in a git history and identify all file revisions (which creates |
24 |
> a cvs-like per-file history which can then be compared with results |
25 |
> obtained from parsing a cvs repository for the same information). The |
26 |
> only single-threaded step in the process is walking the list of |
27 |
> commits - all the diffs can be highly paralleled. |
28 |
|
29 |
There use to be a central repo for many of the common gentoo admin scripts, |
30 |
any idea where it is now that things have move to github? |
31 |
(https://code.google.com/archive/p/genscripts/source) |
32 |
|
33 |
I think there were others. The reason I like those, particularly for |
34 |
new learning like python, is you get to see good and robust scripting |
35 |
styles from the gentoo devs. Really helps when learning something new, |
36 |
even if you have to figure out why things are written in a certain way. |
37 |
|
38 |
|
39 |
> I doubt you need anything quite so fancy. As you can see from the |
40 |
> script pulling metadata out of commits and walking through parents is |
41 |
> pretty easy. |
42 |
|
43 |
ipython is some thing I want to learn by experimentation. |
44 |
|
45 |
|
46 |
> My example doesn't account for merge commits. There weren't any in |
47 |
> the cvs->git migration. Obviously walking commits with merges will |
48 |
> get a lot messier. |
49 |
|
50 |
I do not think I need 'merge commits' for one offs, that is pulling |
51 |
old codes into a development system. Later on, when I get more aggressive, |
52 |
pulling old codes to run on gentoo cluster, I might pester the list seeking |
53 |
more advice. |
54 |
|
55 |
|
56 |
Thanks for the help, and encouragement, |
57 |
James |