Bug in pathList parameter passed to IBugTraqProvider2 CheckCommit and OnCommitFinished
From: <webpost_at_tigris.org>
Date: Tue, 14 Apr 2009 13:51:43 -0700 (PDT)
I have run across a major bug with this, which makes it unusable for us. But I think I have narrowed it down enough that fixing it should be quick.
We are doing an integration with OnTime, and we wanted to update the OnTime bug to list the files changed for the selected bug. I have it working almost perfectly, but there is a case where the parameter is incorrect. This came to light when the OnTime database was populated with a directory instead of a path.
So, I put some debug messages into CheckCommit, where I could return a string which stopped the commit. This allowed me to play with many different scenarios rapidly, and this is what I found.
The debug message I used showed me the pathList array which was passed in to CheckCommit(). When the Commit dialog box first appears, all files which have changes are selected, as is the "select/deselect all" checkbox. When OK is pressed at this point, the pathList has one entry, which is the root path of the commit.
When any number of files that is less than all files is checked, pathList is correct. However, checking that final, unselected file causes a problem. The pathList remains what it was just before that final check. The important part is that checking that last unchecked file also causes the "select/deselect all" checkbox to become selected, and I think this is the root of the problem. Something in that callback is causing this issue.
Another way to see this in action: say that there are 6 files available that have changed. Select any combination, less than all of them, and pathList is correct. Now, instead of selecting the files, check the "select/deselect all" checkbox. All files are now checked, but pathList is exactly the same as it was before. If 4 files were selected, then pathList will have those 4 files only.
I'm not sure exactly how, but I think this is the reason that pathList has a single entry when the dialog box first comes up. Since the "select/deselect all" checkbox is checked, it is affecting the pathList, causing it to be the directory.
So, things work just fine if the user always leaves one file unchecked when committing, but obviously this is not a realistic workaround. Hopefully, I have provided enough information for the brilliant programmers here to find (and hopefully fix) this problem quickly and easily. Thanks!
Jim Z.
------------------------------------------------------
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
|
This is an archived mail posted to the TortoiseSVN Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.