workbench: don't switch to commit tab by clicking qtip row
Created originally on Bitbucket by Neutrino_Sunset (Neutrino Sunset)
Tested on: Win 7 Ultimate
Using: tortoisehg-2.1-hg-1.9-x64 (where can the full build number be found?)
This is a difficult to explain issue so please forgive the step by step reproduction.
C:\Workspaces\HgTest>hg init HgTest
C:\Workspaces\HgTest>echo revision 1 > file1.txt
C:\Workspaces\HgTest>hg add adding file1.txt
C:\Workspaces\HgTest>hg commit -m "r1"
C:\Workspaces\HgTest>echo revision 2 >> file1.txt
C:\Workspaces\HgTest>hg commit -m "r2"
C:\Workspaces\HgTest>echo revision 3 >> file1.txt
This gives to a new repository, a couple of commited changesets and some outstanding local modifications.
If at this point you right click HgTest in Windows Explorer and open the workbench everything is good.
In the Graph Log clicking any of the changeset entries displays the details of that changeset in Revision Details mode, and clicking on the Working Directory entry shows the outstanding modifications in Commit mode.
Now close the Workbench and do this. First a revert to clear local modifications.
C:\Workspaces\HgTest>hg revert -a reverting file1.txt
Now create a patch and an outstanding modification.
C:\Workspaces\HgTest>hg qnew patch1 -m "patch1"
C:\Workspaces\HgTest>echo patch1 stuff >> file1.txt
Now open the Workbench again. At first glance everything looks good. On the toolbar the Revision Details button is pressed, in the Graph Log patch1 is highlighted and the changeset details and diff are displayed with nothing in them (which is correct since the patch has not been refreshed).
But now if you click any other revision or the Working Directory and then click back on patch1 instead of seeing the same Revision Details view again the UI instead switches into Commit mode as it normally does when you click the Working Directory.
This seems like a bug because you'd expect the UI to switch into the same mode when clicking the same item.
Now close the Workbench again and do this.
C:\Workspaces\HgTest>hg qnew patch2 -m "patch2"
C:\Workspaces\HgTest>echo patch2 >> file1.txt
C:\Workspaces\HgTest>echo more changes >> file1.txt
Now you have 2 patches, both refreshed and some outstanding local modifications. Open the Workbench again.
As before it opens looking good, patch2 is selected, the UI is in Revision Details mode and the correct diff of patch2 is displayed. But when you switch away from patch2 and then switch back to it, the UI no longer remains in Revision Details mode but instead switches to Commit mode.
In this state you can click on patch1 and see its contents, but if you click on patch2 instead of seeing its already refreshed contents in Revision Details mode (which you could see when the Workbench first opened) instead you now see a combination of its already refreshed changes mixed together with the outstanding changes.
This is inconsistent and confusing, and it leaves you with no way to see the already refreshed contents of the qtip patch.
I think that's a bug and that the correct behaviour is that selecting any changeset (repository or patch) should always present a Revision Details view, and that you should only ever see working copy modifications by clicking the Working Directory entry.