|
From: Eric S. R. <es...@th...> - 2017-10-21 11:39:14
|
"Bastian Märkisch" <bma...@we...>: > So it might be worth looking at the algorithm again. If the script > is available, I can try to help tweaking it. Otherwise, we would > have to come up with a list of manual corrections. In any case I > think we have a lot of work to do to verify the attributions. wget http://www.catb.org/~esr/gnuplot-conversion.tar.gz This will fetch you the conversion script and all the files needed to run it, into a directory named gnuplot-conversion. There's a README. The ChangeLog mining is in reposurgeon after around line 12417, in the function do_changelogs. I think it is well worth getting this right, as the code can then be re-used for other project conversions. Here is what it is intended to do: For each changeset in the repository conversion that includes a ChangeLog blob: 1. Fetch the ancestral version of ChangeLog, if it has one. Compare leading lines until you hit a pair that doesn't match. That line number beciomes the value of 'changeline'. If you find no ancestor, let changeline be 0. 2. Walk through the (newer) Changelog line file. Parse each attribution time for date and email address, soeing them in variables 'date' and 'addr'. 3. Break out of that loop when (a) the line you just parsed is at or after changeline, or (b) you reach EOF. There is a test in the test/ directory that shows this will correctly handle both the ordinary case of a new entry at the top of the file and the case where and entry is inserted after the top entry; see "Hilda J. Foonly" in liftlog.fi. The other files to look at are liftlog.tst (the reposurgeon script for this test) and liftlog.chk (the expected result). Note how in the .chk file the author slots of the last two commits have been set from the version of ChangLog in that commit. Run 'singletest liftlog' in test/ to rerun the test. (In case you've never seen one before, liftlog.fi and liflog.chk are git fast-export dumps of a small repository before and after surgery. These dumps capture the entire revision history and can be reconstituted into a live repo with fi-fast-import.) -- <a href="http://www.catb.org/~esr/">Eric S. Raymond</a> My work is funded by the Internet Civil Engineering Institute: https://icei.org Please visit their site and donate: the civilization you save might be your own. |