From ef8da813ab0783545f8a1b502dc9292ee048a091 Mon Sep 17 00:00:00 2001 From: Colin Law Date: Tue, 3 Feb 2009 12:36:10 +0000 Subject: [PATCH] Fix bug messing up overlays after attempted commit with empty message. If an attempt is made to commit with no message entered the commit fails but then the overlay for files marked for commit is set to unmodified. Fixed by trapping empty message before attempting commit. --- src/Resources/TortoiseProcENG.rc | Bin 402998 -> 403148 bytes src/TortoiseProc/CommitDlg.cpp | 12 +++++++++--- src/TortoiseProc/resource.h | Bin 149464 -> 149556 bytes 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Resources/TortoiseProcENG.rc b/src/Resources/TortoiseProcENG.rc index 8e682f02489056d7462d52f9824f41be62261b43..90a61f05cf179e9da45a9b8aefaabcdbe0f36d6c 100644 GIT binary patch delta 105 zcmdmXM&is_iG~)&7N!>FEi7~Dr~8<&2u%NQpIJiHm%)`G7ziC1+<`0w1|^0_hJ1!n zAS)M07BiFpS*g<<-?9i#|1*(QWO_+Aqrmi4vsrnjPr1wN2QtH`U95p+yI2FO!ZHA; C#~{uC delta 37 tcmX?eR$|*3iG~)&7N!>FEi7~Dr%PqCcufCrpV_E=O#{pJH4Ur^%K$HA519Y} diff --git a/src/TortoiseProc/CommitDlg.cpp b/src/TortoiseProc/CommitDlg.cpp index 60d7edc..e9bd3be 100644 --- a/src/TortoiseProc/CommitDlg.cpp +++ b/src/TortoiseProc/CommitDlg.cpp @@ -316,6 +316,12 @@ void CCommitDlg::OnOK() return; } m_sLogMessage = m_cLogMessage.GetText(); + if ( m_sLogMessage.IsEmpty() ) + { + // no message entered, go round again + CMessageBox::Show(this->m_hWnd, IDS_COMMITDLG_NOMESSAGE, IDS_APPNAME, MB_OK | MB_ICONERROR); + return; + } if ((m_ProjectProperties.bWarnIfNoIssue) && (id.IsEmpty() && !m_ProjectProperties.HasBugID(m_sLogMessage))) { if (CMessageBox::Show(this->m_hWnd, IDS_COMMITDLG_NOISSUEWARNING, IDS_APPNAME, MB_YESNO | MB_ICONWARNING)!=IDYES) @@ -706,7 +712,7 @@ UINT CCommitDlg::StatusThread() { m_bShowUnversioned = TRUE; GetDlgItem(IDC_SHOWUNVERSIONED)->SendMessage(BM_SETCHECK, BST_CHECKED); - DWORD dwShow = SVNSLC_SHOWVERSIONEDBUTNORMALANDEXTERNALSFROMDIFFERENTREPOS | SVNSLC_SHOWUNVERSIONED | SVNSLC_SHOWLOCKS; + DWORD dwShow = (DWORD)(SVNSLC_SHOWVERSIONEDBUTNORMALANDEXTERNALSFROMDIFFERENTREPOS | SVNSLC_SHOWUNVERSIONED | SVNSLC_SHOWLOCKS); m_ListCtrl.UpdateFileList(CGitStatusListCtrl::FILELIST_UNVER); m_ListCtrl.Show(dwShow); } @@ -916,7 +922,7 @@ LRESULT CCommitDlg::OnGitStatusListCtrlNeedsRefresh(WPARAM, LPARAM) return 0; } -LRESULT CCommitDlg::OnFileDropped(WPARAM, LPARAM lParam) +LRESULT CCommitDlg::OnFileDropped(WPARAM, LPARAM /*lParam*/) { #if 0 BringWindowToTop(); @@ -1197,7 +1203,7 @@ void CCommitDlg::InsertMenuItems(CMenu& mPopup, int& nCmd) mPopup.AppendMenu(MF_STRING | MF_ENABLED, m_nPopupPasteListCmd, sMenuItemText); } -bool CCommitDlg::HandleMenuItemClick(int cmd, CSciEdit * pSciEdit) +bool CCommitDlg::HandleMenuItemClick(int /*cmd*/, CSciEdit * /*pSciEdit*/) { #if 0 if (m_bBlock) diff --git a/src/TortoiseProc/resource.h b/src/TortoiseProc/resource.h index af989ee4a8c1ae8336d02ebb1898faa7b4797d0e..f156f380d5eeada3b9431a784dee22c95727bbaf 100644 GIT binary patch delta 39 xcmV+?0NDT7j|sGp34pW#e3z4;sRWZC1|XN9lmP~p)C&S0lQ5|iw|tiYT(Cop4}Jgu delta 17 Zcmdlof%8T`XTui8n(5nbOlOSQ002qm2sr=% -- 2.11.0