Dieser Post wurde aus meiner alten WordPress-Installation importiert. Sollte es Darstellungsprobleme, falsche Links oder fehlende Bilder geben, bitte einfach hier einen Kommentar hinterlassen. Danke.
Padre is not only "some open source project I'm involved", but a tool I'm using for every day's work. Yesterdays "svn update" brought a new bug, files as ticket #1286. Hunting down a newline issue isn't that easy, because many things from Wx events, encoding, line ending up to keypress-events or intelligent code suggestion may have the bug.
More than 200 commits came in between the last known-to-be-working and the known-to-be-broken svn revision, so surfing through the changelogs would be a really long term jobs.
Here is what I know:
- revision 15346 is broken
- some revision around 15115 was working
I didn't try out the bug on a blank file before, so maybe it was there in 15100 but it doesn't happen in new files? Updating to revision 15300 and testing again verified two things:
- The bug is reproduceable with a new, blank file and one ENTER touch
- The bug was already here in 15300
- revision 15200 is working, bug must be between 15200 and 15300
- cut down the remaining options by half: revision 15250 is working
- revision 15275 (again the middle between known-working and known-broken) working, too
- revision 15287 working
- revision 15294 is broken, but due to source syntax typos in Padre/Config.pm, no answer about the bug
- revision 15295 fixes the typos, but has the bug I'm hunting, it was introduced between 15287 and 15294
- revision 15290 is bug-free, four revisions and three tests left
- revision 15292 is working
- revision 15293 updated the translation database only, no chance this could be the bug source
To verify the assumption, current trunk (15349) plus Editor.pm and Main.pm from 15293 will go for the next test. This may also crash Padre because two main source files are much older than the rest of the source, but it worked and didn't have the bug. Using both files from 15394 showed the bug. The commit to Padre trunk revision 15394 made huge changes to the Editor and smaller changes to Main.pm. Life would be easy if Main.pm would be the source, but I didn't expect the changes shown in trac to be responsible and unlikely I was right.
Now, running current trunk with old 15394 Editor.pm, intelligent use of a versioning system took me as near to the evil little bug as it could, reducing some 1000 lines of changed source down to 100 or so, I'll step down into the commit checking the lines and trying around until #1286 is fixed, but this may be the story of another blog post...
4 Kommentare. Schreib was dazu-
Pedro Melo
10.08.2011 14:16
Antworten
-
Sebastian
10.08.2011 14:58
Antworten
-
Jakub Narebski
10.08.2011 18:04
Antworten
-
Nitin Garg
29.05.2012 12:05
Antworten
You've just described git bisect :)
Wow, I didn't expect something that easy to have tools. :-)
It is not as easy if history is non-linear (branchy). And there is also 'git bisect run' for automated testing and 'git bisect skip' for marking those revisions that are untestable.
Nice use of the binary search concept! :D