|
From: <es...@th...> - 2017-10-13 12:56:43
|
You haven't heard from me in a couple of days because I decided to
build a ChangeLog parser into reposurgeon and have been working on
that.
It's not an easy problem, and I have doubts that the information
extracted that way will either cover a lot of commits or be of
useful quality.
Here's what my documentation now says about the feature:
Mine the latest version of every ChangeLog file for authorship data.
Assume such files have basenames beginning with 'ChangeLog', and that
they are in the format used by FSF projects: entry header lines begin
with YYYY-MM-DD and are followed by a fullname/address, entry file
path lists in the text are delimited by '*' and ':' and each list
always begins first on a line after whitespace.
The logic attempts to match commits by path manifest and date; the
ChangeLog from which an entry derives is added to its manifest.
Because of time zone issues, each entry date is allowed to match
commit dates 12 hours earlier or later in UTC.
To allow for lag in applying inbound patches, the forward window can be
extended by a length of time given as a command-line argument in hours;
the default is 0. Note that setting this high is likely to cause false
matches, especially on single-file commits.
When an commit matches an entry, the attribution and the date from the
entry are copied to the author list of the commit. This can happen
more than once per entry. Author attributions generated this way will
always have a timestamp of 00:00:00 with an offset of +0000.
These attributions are marginally better than nothing but should not
be greatly trusted.
Alas, the problems here are fundamental, stemming from inadequate data
representations, and cannot be fixed with clever programming.
I have written the ChangeLog parser stage and am working on the
logic to match ChangeLog entries to commits.
By the way, while working on this I found a bad date 2206-07-27
in term/lua/ChangeLog. That probably wants to be 2006; somebody
should fix it.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
A true libertarian supports free enterprise, opposes big business;
supports local self-government, opposes the nation-state; supports the
National Rifle Association, opposes the Pentagon. -- Edward Abbey
|