A story about SVN logging
Posted: Thu Nov 26, 2009 1:06 am
So the other day I was compiling a program with GCC4.4 and because the code was written for Windows it had a lot of errors. So while debugging and trying to find a solution for all those little sloppy inaccuracies, I stumbled upon a very curious error:
The concerning line in code said just:
Google had only 111 results for exactly that kind of error and as I read further the code it is used in, is exclusively for OpenCV. In other words: only OpenCV and people writing extensions for OpenCV are using this kind of construct, that I stumbled upon.
The first result from Google was a mailing list excerpt. I usually don't like to read those, but what can I do with just 111 results, right? In the mail they talked about a revision in the OpenCV SVN repository, that did not compile on Linux. My error was the same, but they had a more elaborate error message (I later learned, that I should not have compiled with the -Wfatal-errors flag). However I still didn't know what it was all about. The answer to the mail was: "Oh thanks, I fixed it." Or something similar, so that was not really a help. Also, the mail was already 9 months old.
Now luckily the first guy mentioned the SVN revision number, so I had a look at the OpenCV SVN repository and searched for the revision number. They have a similar http thing like Orxonox to browse the repository. To my great delight the revision log for the mentioned commit plus 1 said "fixed errors in GCC" and I quickly found the file and I had a look at the changes. Now that I saw, that they just basically moved around lines of code and since the more elaborate error message was consisting of errors in earlier lines of code, it was kind of easy to find out what I had to do.
So after I moved around some lines and declared variables before I later initialized them, I was able to solve that error.
I think the lessons from this story should be this:
Code: Select all
error: jump to label ‘exit’
Code: Select all
__END__;
The first result from Google was a mailing list excerpt. I usually don't like to read those, but what can I do with just 111 results, right? In the mail they talked about a revision in the OpenCV SVN repository, that did not compile on Linux. My error was the same, but they had a more elaborate error message (I later learned, that I should not have compiled with the -Wfatal-errors flag). However I still didn't know what it was all about. The answer to the mail was: "Oh thanks, I fixed it." Or something similar, so that was not really a help. Also, the mail was already 9 months old.
Now luckily the first guy mentioned the SVN revision number, so I had a look at the OpenCV SVN repository and searched for the revision number. They have a similar http thing like Orxonox to browse the repository. To my great delight the revision log for the mentioned commit plus 1 said "fixed errors in GCC" and I quickly found the file and I had a look at the changes. Now that I saw, that they just basically moved around lines of code and since the more elaborate error message was consisting of errors in earlier lines of code, it was kind of easy to find out what I had to do.
Code: Select all
error: from here
error: crosses initialization of '...'
...
I think the lessons from this story should be this:
- Discuss errors in the open (open mailing lists).
- Write good and simple SVN log messages.
- Have an easy to browse repository.