From b0f830f34b140ff51ef32a8b89128d438bbd38c8 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sat, 28 Dec 2013 14:18:00 +0100 Subject: [PATCH] Fixed issue #1913: SVN DCommit Button in successful merge Dialog Signed-off-by: Sven Strickroth --- src/Changelog.txt | 1 + src/TortoiseProc/AppUtils.cpp | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/Changelog.txt b/src/Changelog.txt index 58e56f235..643a6a349 100644 --- a/src/Changelog.txt +++ b/src/Changelog.txt @@ -29,6 +29,7 @@ Released: Unreleased * Fixed issue #1820: Show Assume valid/unchanged files in repo status dialog on a separate list * Fixed issue #1603: Make "Show Whole Project" in log and commit dialog autosaved * Fixed issue #827: add the option to autoclose the "Git command progress" window + * Fixed issue #1913: SVN DCommit Button in successful merge Dialog == Bug Fixes == * Fixed issue #1947: When editing git notes, spurious reformatting is done diff --git a/src/TortoiseProc/AppUtils.cpp b/src/TortoiseProc/AppUtils.cpp index e3c2d2153..5f26250dc 100644 --- a/src/TortoiseProc/AppUtils.cpp +++ b/src/TortoiseProc/AppUtils.cpp @@ -63,6 +63,7 @@ #include "SysProgressDlg.h" #include "UserPassword.h" #include "Patch.h" +#include "Globals.h" CAppUtils::CAppUtils(void) { @@ -3036,10 +3037,17 @@ BOOL CAppUtils::Merge(CString *commit) CProgressDlg Prodlg; Prodlg.m_GitCmd = cmd; + BOOL hasGitSVN = CTGitPath(g_Git.m_CurrentDir).GetAdminDirMask() & ITEMIS_GITSVN; if (dlg.m_bNoCommit) Prodlg.m_PostCmdList.Add(CString(MAKEINTRESOURCE(IDS_MENUCOMMIT))); - else if (dlg.m_bIsBranch) - Prodlg.m_PostCmdList.Add(CString(MAKEINTRESOURCE(IDS_PROC_REMOVEBRANCH))); + else + { + if (dlg.m_bIsBranch) + Prodlg.m_PostCmdList.Add(CString(MAKEINTRESOURCE(IDS_PROC_REMOVEBRANCH))); + + if (hasGitSVN) + Prodlg.m_PostCmdList.Add(CString(MAKEINTRESOURCE(IDS_MENUSVNDCOMMIT))); + } Prodlg.m_PostCmdCallback = MergeCallback; @@ -3074,7 +3082,11 @@ BOOL CAppUtils::Merge(CString *commit) MessageBox(NULL, out, _T("TortoiseGit"), MB_OK); } } + else if (hasGitSVN) + CAppUtils::SVNDCommit(); } + else if (ret == IDC_PROGRESS_BUTTON1 + 1 && hasGitSVN) + CAppUtils::SVNDCommit(); return !Prodlg.m_GitStatus; } -- 2.11.4.GIT