|
From: Eric S. R. <es...@th...> - 2017-10-21 21:30:54
|
Daniel J Sebald <dan...@ie...>:
> From step 3, I think you meant to place the test of 'n' and 'changeline' at
> the front of loop and 'break' (on >) instead. I.e.,
>
> if n > changeline:
> break
> if ',' in line:
> # Multiple attributions...ignore for now
> continue
> # Deal with some address masking
> line = line.replace(" <at> ", "@")
> space = line.find(" ")
> if space < 0:
> continue
> ETC.
>
> It should break if "n > changeline", not if "n >= changeline", because we
> want to include the scenario of author info at the first changed line (which
> is the most typical scenario).
That change didn't work - broke my regression test for two other cases. But
I found an easier-to-understand change that did. The liftlog regression test
now verifies three cases -- new entry at to of file, new entry within the file,
and addition of text to an entry within the file.
> While on the subject, I see you've include the "if only ChangeLog changes,
> ignore" heuristic. What about the case of the change in the ChangeLog being
> a subtraction rather than an addition. I left that out because all the
> scenarios I imagined that happening were a situation we wanted to ignore any
> authorship change and just let the committer have authorship (e.g.,
> wholesale swap of ChangeLog.0 to ChangeLog.1, some typo in the authorship
> line was corrected). I'm not sure your code differentiates between the two
> (it looks to be searching just for change), but really this is a very low
> likelihood of occurrence so maybe it isn't worth toiling over that.
I don't think so. Unless a real case smacks ua in the case, anyway.
I've uploaded a new test tarball that you can get with
wget http://www.catb.org/~esr/gnuplot-conversion.tar.gz
Please check it against your edge cases.
--
<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.
|