You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that the git parser delivers empty committer/author which eventually leads to a crash in DBContentHandler:
DBG: DBProxyContentHandler: commit: a2190644e03b4e1918331a3e4f0459971f66c1e0
Traceback (most recent call last):
File "./cvsanaly2", line 37, in <module>
retval = pycvsanaly2.main.main (sys.argv[1:])
File "/media/DATA/Resources/Tools/cvsanaly/cvsanaly-fork-latest/pycvsanaly2/main.py", line 398, in main
parser.end()
File "/media/DATA/Resources/Tools/cvsanaly/cvsanaly-fork-latest/pycvsanaly2/Parser.py", line 63, in end
self.handler.end()
File "/media/DATA/Resources/Tools/cvsanaly/cvsanaly-fork-latest/pycvsanaly2/DBProxyContentHandler.py", line 84, in end
self.db_handler.commit(item)
File "/media/DATA/Resources/Tools/cvsanaly/cvsanaly-fork-latest/pycvsanaly2/DBContentHandler.py", line 634, in commit
log.committer = self.__get_person(commit.committer)
File "/media/DATA/Resources/Tools/cvsanaly/cvsanaly-fork-latest/pycvsanaly2/DBContentHandler.py", line 256, in __get_person
name = to_utf8(person.name)
AttributeError: 'NoneType' object has no attribute 'name'
This occurs when the author field from the git log is not properly structured, e.g.
commit 8ba37b53db628bdd4ec2e8d54ada008e66a46100
Author: Keith Schwarz <[email protected]>
Date: Sun Sep 21 07:14:52 2008 +0200
causes a crash (due to the left paren instead of an angled bracket). Both examples are taken from Firefox mercurial repo converted to Git. The mercurial repo has the same malformed user ID.
I guess there are two options:
make the git parser more flexible in terms of regexes, which in this case may as well be an overkill, since such malformed inputs are (as far as my observations go) not very common, or
improve the error handling down the line (in particular in the DBContentHandler, but possibly elsewhere as well) so that malformed input does not result in a crash but simply a debug/warning message and a null value in the database, so that one could potentially fix such cases manually if they are indeed not very common.
As a temporary workaround, exporting the log file from git (-s switch), fixing the input issues, and then using it as input (-i switch) should hopefully help in this case, however in the long term a more viable solution would be preferable as it often results in wasting hours of processing only to fail at a very late stage.
The text was updated successfully, but these errors were encountered:
It appears that the git parser delivers empty committer/author which eventually leads to a crash in DBContentHandler:
This occurs when the author field from the git log is not properly structured, e.g.
is fine, while
causes a crash (due to the left paren instead of an angled bracket). Both examples are taken from Firefox mercurial repo converted to Git. The mercurial repo has the same malformed user ID.
I guess there are two options:
As a temporary workaround, exporting the log file from git (-s switch), fixing the input issues, and then using it as input (-i switch) should hopefully help in this case, however in the long term a more viable solution would be preferable as it often results in wasting hours of processing only to fail at a very late stage.
The text was updated successfully, but these errors were encountered: