We received a report from a user that in Tk 8.5.8 the treeview
widget is not displaying selected rows properly on Windows. The user
reported that this was fine in the 8.5.7 release. We now know that the
bug was introduced somewhere between these two points. To refine this
I created a small test script and switched to the 8.5 development
branch.
We can begin the bisection by letting git know the references for
the bad and the known good commits. These can be provided as SHA1 ids
or as tags. In this case we have release tags.
C:\opt\tcl\src\tk.git>git bisect start core-8-5-8 core-8-5-7
Bisecting: 30 revisions left to test after this (roughly 5 steps)
[b2905899c223a5b9d98dd53577267ba9f26781ea] Fix [Bug 2824378] by correcting expected output.
We then build this version and run the test script and find that
this commit has the bug we are interested in. So we tell bisect this
is a bad commit. It then chooses a new commit and switches the working
tree to that point in time.
C:\opt\tcl\src\tk.git>git bisect bad
Bisecting: 14 revisions left to test after this (roughly 4 steps)
[efc88ec4463f836d3e2a65a01034205ae0a66ee3] avoid panic for CFStrings longer than INT_MAX
Now we repeat the build and test cycle 4 more times and on eacy
cycle tell git if the test passed (good) or failed (bad). Eventually
it works down to a single commit and lets us know about the commit
that introduced this bug.
C:\opt\tcl\src\tk.git>git bisect good
5a4d9fdad0040ecb889e37f71852ad5841716647 is the first bad commit
commit 5a4d9fdad0040ecb889e37f71852ad5841716647
Author: patthoyts <patthoyts>
Date: Thu May 14 00:53:04 2009 +0000
Backported support for the Vista theme.
This requires the vsapi element engine, the hover state and the theme script
definition.
:100644 100644 f7b29f475f368228a42832783753bd9e0155d46b 28ff725bfb329f6702ce2713f42711167165fd28 M ChangeLog
:040000 040000 d1720dc0d00d10c9fb3e3d50b852164276942b42 9ed214bee06fd297e88e1fdeca77bc9319fcc386 M doc
:040000 040000 24c258f8c1068b82ff3f9d7850611ee897c06ade 5a5179809754c654bcc4fb76e49fd9c476c1acfc M generic
:040000 040000 c56aa9dadb0e2b02808b9fc34515481290091768 e0776e27ae03e709e2cc6da95ce1bf9ef43ad8a7 M library
:040000 040000 76e04b7d2c6f7e851d68d420bab551382818b7bf 08bb26a478f72b8e92baebf0213e1eb0b4d0ce92 M tests
:040000 040000 2ffb214a52d608f8801c7a4cab210f082528c398 0178942ec72d67f4bddc3a8a88870dcd83869ff1 M win
Now I can use gitk to examine the details of this commit and see
that when I backported this from the 8.6 branch it removed some
entries for the XP theme that are still required on 8.5 even though
the elements have been removed from 8.6. A quick patch and test and
the fix is ready.
The final thing to remember is to tell git you have finished using
git bisect reset so that it can clean up the internal tags it
uses to tract the bisect progress and move your working tree back to
where it began.