comparison src/mainwindow.cpp @ 505:1c05e7576ea5

Fix bug #292: "Merge that results in no changes leaves interface in inconsistent state." Show uncommitted state whenever a merge is present, even if no file changes
author Chris Cannam
date Mon, 17 Oct 2011 16:25:02 +0100
parents 21aa41b62c3a
children 470829a21f98
comparison
equal deleted inserted replaced
504:d972f0cd61b3 505:1c05e7576ea5
2242 m_lastStatOutput = output; 2242 m_lastStatOutput = output;
2243 updateFileSystemWatcher(); 2243 updateFileSystemWatcher();
2244 break; 2244 break;
2245 2245
2246 case ACT_RESOLVE_LIST: 2246 case ACT_RESOLVE_LIST:
2247 // This happens on every update, after the stat (above)
2247 if (output != "") { 2248 if (output != "") {
2248 // Remove lines beginning with R (they are resolved, 2249 // Remove lines beginning with R (they are resolved,
2249 // and the file stat parser treats R as removed) 2250 // and the file stat parser treats R as removed)
2250 QStringList outList = output.split('\n'); 2251 QStringList outList = output.split('\n');
2251 QStringList winnowed; 2252 QStringList winnowed;
2683 if (settings.value("extdiffbinary", "").toString() != "") { 2684 if (settings.value("extdiffbinary", "").toString() != "") {
2684 haveDiff = true; 2685 haveDiff = true;
2685 } 2686 }
2686 settings.endGroup(); 2687 settings.endGroup();
2687 2688
2689 m_hgTabs->setHaveMerge(m_currentParents.size() == 2);
2690
2688 m_hgRefreshAct->setEnabled(m_localRepoActionsEnabled); 2691 m_hgRefreshAct->setEnabled(m_localRepoActionsEnabled);
2689 m_hgFolderDiffAct->setEnabled(m_localRepoActionsEnabled && haveDiff); 2692 m_hgFolderDiffAct->setEnabled(m_localRepoActionsEnabled && haveDiff);
2690 m_hgRevertAct->setEnabled(m_localRepoActionsEnabled); 2693 m_hgRevertAct->setEnabled(m_localRepoActionsEnabled);
2691 m_hgAddAct->setEnabled(m_localRepoActionsEnabled); 2694 m_hgAddAct->setEnabled(m_localRepoActionsEnabled);
2692 m_hgRemoveAct->setEnabled(m_localRepoActionsEnabled); 2695 m_hgRemoveAct->setEnabled(m_localRepoActionsEnabled);
2766 m_justMerged = false; 2769 m_justMerged = false;
2767 } else { 2770 } else {
2768 haveMerge = true; 2771 haveMerge = true;
2769 m_justMerged = true; 2772 m_justMerged = true;
2770 } 2773 }
2771 2774
2772 m_hgIncomingAct->setEnabled(m_remoteRepoActionsEnabled); 2775 m_hgIncomingAct->setEnabled(m_remoteRepoActionsEnabled);
2773 m_hgPullAct->setEnabled(m_remoteRepoActionsEnabled); 2776 m_hgPullAct->setEnabled(m_remoteRepoActionsEnabled);
2774 // permit push even if no remote yet; we'll ask for one 2777 // permit push even if no remote yet; we'll ask for one
2775 m_hgPushAct->setEnabled(m_localRepoActionsEnabled && !emptyRepo); 2778 m_hgPushAct->setEnabled(m_localRepoActionsEnabled && !emptyRepo);
2776 2779