From 61cf7acda54072d3a38d518d2257bd8e7249ecaf Mon Sep 17 00:00:00 2001 From: Sup Yut Sum Date: Thu, 13 Dec 2012 19:25:01 +0800 Subject: [PATCH] Add button to push notes in Sync Dialog Signed-off-by: Sup Yut Sum Signed-off-by: Sven Strickroth --- Languages/Tortoise.pot | 4 ++++ src/Changelog.txt | 1 + src/Resources/TortoiseProcENG.rc | 1 + src/TortoiseProc/SyncDlg.cpp | 9 +++++---- src/TortoiseProc/resource.h | 1 + 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Languages/Tortoise.pot b/Languages/Tortoise.pot index 529d5039b..40265158a 100644 --- a/Languages/Tortoise.pot +++ b/Languages/Tortoise.pot @@ -6242,6 +6242,10 @@ msgstr "" msgid "Push" msgstr "" +#. Resource IDs: (1385) +msgid "Push notes" +msgstr "" + #. Resource IDs: (76) msgid "Push ta&gs" msgstr "" diff --git a/src/Changelog.txt b/src/Changelog.txt index cb6dc198b..22159ae09 100644 --- a/src/Changelog.txt +++ b/src/Changelog.txt @@ -33,6 +33,7 @@ Released: unreleased * Fixed issue #1467: put remote branches at the bottom in "branches" dropdowns (can be disabled using advanced settings) * Fixed issue #1285: Show Log Filter on Tags * Uncheck "Track" checkbox when creating a branch with different name to remote branch + * Add button to push notes in Sync Dialog == Bug Fix == * Fixed issue #1535: Unclear UI in prompt dialog of Stash Save diff --git a/src/Resources/TortoiseProcENG.rc b/src/Resources/TortoiseProcENG.rc index 877b12e80..078743db2 100644 --- a/src/Resources/TortoiseProcENG.rc +++ b/src/Resources/TortoiseProcENG.rc @@ -3920,6 +3920,7 @@ BEGIN IDS_GITVER_REQUIRED "%s requires msysgit >= %s" IDS_SETTINGS_SYMBOLIZEREFNAMES_TT "Show symbols on ref labels to substitute part of the ref names" + IDS_PROC_SYNC_PUSHNOTES "Push notes" END #endif // English (U.S.) resources diff --git a/src/TortoiseProc/SyncDlg.cpp b/src/TortoiseProc/SyncDlg.cpp index 136bf7823..9a4364d24 100644 --- a/src/TortoiseProc/SyncDlg.cpp +++ b/src/TortoiseProc/SyncDlg.cpp @@ -452,13 +452,14 @@ void CSyncDlg::OnBnClickedButtonPush() } } + CString refName = g_Git.FixBranchName(m_strLocalBranch); switch (m_ctrlPush.GetCurrentEntry()) { case 1: arg += _T(" --tags "); break; case 2: - arg += _T(" --all "); + refName = _T("refs/notes/commits"); //default ref for notes break; } @@ -471,9 +472,9 @@ void CSyncDlg::OnBnClickedButtonPush() cmd.Format(_T("git.exe push -v %s \"%s\" %s"), arg, m_strURL, - g_Git.FixBranchName(m_strLocalBranch)); + refName); - if (!m_strRemoteBranch.IsEmpty()) + if (!m_strRemoteBranch.IsEmpty() && m_ctrlPush.GetCurrentEntry() != 2) { cmd += _T(":") + m_strRemoteBranch; } @@ -801,7 +802,7 @@ BOOL CSyncDlg::OnInitDialog() this->m_ctrlPush.AddEntry(CString(MAKEINTRESOURCE(IDS_PROC_SYNC_PUSH))); this->m_ctrlPush.AddEntry(CString(MAKEINTRESOURCE(IDS_PROC_SYNC_PUSHTAGS))); - ///this->m_ctrlPush.AddEntry(CString(_T("Push All"))); + this->m_ctrlPush.AddEntry(CString(MAKEINTRESOURCE(IDS_PROC_SYNC_PUSHNOTES))); this->m_ctrlPull.AddEntry(CString(MAKEINTRESOURCE(IDS_PROC_SYNC_PULL))); this->m_ctrlPull.AddEntry(CString(MAKEINTRESOURCE(IDS_PROC_SYNC_FETCH))); diff --git a/src/TortoiseProc/resource.h b/src/TortoiseProc/resource.h index 163431b0e..1eceacf62 100644 --- a/src/TortoiseProc/resource.h +++ b/src/TortoiseProc/resource.h @@ -857,6 +857,7 @@ #define IDC_BUTTON_DOWN2 1385 #define IDC_CONFIG 1385 #define IDC_BUTTON_UNIFIEDDIFF 1385 +#define IDS_PROC_SYNC_PUSHNOTES 1385 #define IDC_FILTER 1387 #define IDC_REVISIONGROUP 1393 #define IDC_REPOLABEL 1394 -- 2.11.4.GIT