• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revisión29433 (tree)
Tiempo2022-07-22 04:05:45
Autorstefankueng

Log Message

add a "Commit" button to the changed-for-modifications dialog

Cambiar Resumen

Diferencia incremental

--- trunk/src/Changelog.txt (revision 29432)
+++ trunk/src/Changelog.txt (revision 29433)
@@ -9,6 +9,8 @@
99 - BUG: hook scripts specified with %REPOROOT% were not
1010 executed correctly for paths more than two
1111 levels down the root. (Stefan)
12+- NEW: Commit button in Changed-for-modifications
13+ dialog. (Stefan)
1214
1315 Version 1.14.3
1416 - BUG: clipboard wasn't closed after pasting into
--- trunk/src/TortoiseProc/ChangedDlg.cpp (revision 29432)
+++ trunk/src/TortoiseProc/ChangedDlg.cpp (revision 29433)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2016, 2021 - TortoiseSVN
3+// Copyright (C) 2003-2016, 2021-2022 - TortoiseSVN
44 // Copyright (C) 2019 - TortoiseGit
55
66 // This program is free software; you can redistribute it and/or
@@ -21,8 +21,10 @@
2121 #include "TortoiseProc.h"
2222 #include "ChangedDlg.h"
2323 #include "AppUtils.h"
24+#include "Commands/CommitCommand.h"
2425
2526 IMPLEMENT_DYNAMIC(CChangedDlg, CResizableStandAloneDialog)
27+
2628 CChangedDlg::CChangedDlg(CWnd* pParent /*=NULL*/)
2729 : CResizableStandAloneDialog(CChangedDlg::IDD, pParent)
2830 , m_bRemote(false)
@@ -37,6 +39,7 @@
3739 , m_bShowFiles(TRUE)
3840 , m_bDepthInfinity(false)
3941 , m_bContactRepository(false)
42+ , m_bShowCommitBtn(false)
4043 , m_bShowPropertiesClicked(false)
4144 {
4245 }
@@ -71,6 +74,7 @@
7174 ON_BN_CLICKED(IDC_SHOWFOLDERS, &CChangedDlg::OnBnClickedShowfolders)
7275 ON_BN_CLICKED(IDC_SHOWFILES, &CChangedDlg::OnBnClickedShowfiles)
7376 ON_WM_SETCURSOR()
77+ ON_BN_CLICKED(IDC_COMMIT, &CChangedDlg::OnBnClickedCommit)
7478 END_MESSAGE_MAP()
7579
7680 BOOL CChangedDlg::OnInitDialog()
@@ -89,6 +93,7 @@
8993 m_aeroControls.SubclassControl(this, IDC_SHOWEXTERNALS);
9094 m_aeroControls.SubclassControl(this, IDC_INFOLABEL);
9195 m_aeroControls.SubclassControl(this, IDC_SUMMARYTEXT);
96+ m_aeroControls.SubclassControl(this, IDC_COMMIT);
9297 m_aeroControls.SubclassControl(this, IDC_REFRESH);
9398 m_aeroControls.SubclassControl(this, IDC_CHECKREPO);
9499 m_aeroControls.SubclassControl(this, IDOK);
@@ -133,9 +138,18 @@
133138 AddAnchor(IDC_SHOWUSERPROPS, BOTTOM_LEFT);
134139 AddAnchor(IDC_SHOWFILES, BOTTOM_LEFT);
135140 AddAnchor(IDC_SHOWFOLDERS, BOTTOM_LEFT);
141+ AddAnchor(IDC_COMMIT, BOTTOM_RIGHT);
136142 AddAnchor(IDC_REFRESH, BOTTOM_RIGHT);
137143 AddAnchor(IDC_CHECKREPO, BOTTOM_RIGHT);
138144 AddAnchor(IDOK, BOTTOM_RIGHT);
145+ if (m_bShowCommitBtn)
146+ {
147+ // only show the commit button if we're showing status for a single path and
148+ // that path is a directory
149+ if (m_pathList.GetCount() == 1 && m_pathList[0].IsDirectory())
150+ GetDlgItem(IDC_COMMIT)->ShowWindow(SW_SHOW);
151+ }
152+
139153 SetPromptParentWindow(m_hWnd);
140154 if (GetExplorerHWND())
141155 CenterWindow(CWnd::FromHandle(GetExplorerHWND()));
@@ -398,3 +412,14 @@
398412 SetCursor(hCur);
399413 return __super::OnSetCursor(pWnd, nHitTest, message);
400414 }
415+
416+void CChangedDlg::OnBnClickedCommit()
417+{
418+ CommitCommand commitCmd;
419+ CCmdLineParser parser;
420+ commitCmd.SetExplorerHwnd(GetSafeHwnd());
421+ commitCmd.SetParser(parser);
422+ commitCmd.SetPaths(m_pathList, {});
423+ commitCmd.Execute();
424+ OnBnClickedRefresh();
425+}
--- trunk/src/TortoiseProc/ChangedDlg.h (revision 29432)
+++ trunk/src/TortoiseProc/ChangedDlg.h (revision 29433)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2006, 2008-2012, 2015, 2021 - TortoiseSVN
3+// Copyright (C) 2003-2006, 2008-2012, 2015, 2021-2022 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -36,6 +36,7 @@
3636 CChangedDlg(CWnd* pParent = nullptr); // standard constructor
3737 ~CChangedDlg() override;
3838 void ContactRepository(bool bContact) { m_bContactRepository = bContact; }
39+ void showCommitButton(bool show) { m_bShowCommitBtn = show; }
3940
4041 // Dialog Data
4142 enum
@@ -58,6 +59,7 @@
5859 afx_msg void OnBnClickedShowUserProps();
5960 afx_msg void OnBnClickedShowfolders();
6061 afx_msg void OnBnClickedShowfiles();
62+ afx_msg void OnBnClickedCommit();
6163 afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
6264 afx_msg LRESULT OnSVNStatusListCtrlNeedsRefresh(WPARAM, LPARAM);
6365 afx_msg LRESULT OnSVNStatusListCtrlItemCountChanged(WPARAM, LPARAM);
@@ -90,6 +92,7 @@
9092 BOOL m_bShowFiles;
9193 bool m_bDepthInfinity;
9294 bool m_bContactRepository;
95+ bool m_bShowCommitBtn;
9396
9497 /// temp. set when the "Properties" was clicked last
9598 bool m_bShowPropertiesClicked;
--- trunk/src/TortoiseProc/Commands/RepoStatusCommand.cpp (revision 29432)
+++ trunk/src/TortoiseProc/Commands/RepoStatusCommand.cpp (revision 29433)
@@ -1,6 +1,6 @@
1-// TortoiseSVN - a Windows shell extension for easy version control
1+// TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2007, 2009, 2014 - TortoiseSVN
3+// Copyright (C) 2007, 2009, 2014, 2022 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -26,6 +26,7 @@
2626 CChangedDlg dlg;
2727 dlg.m_pathList = pathList;
2828 dlg.ContactRepository(!!parser.HasKey(L"remote"));
29+ dlg.showCommitButton(true);
2930 dlg.DoModal();
3031 return true;
3132 }
\ No newline at end of file
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Show on old repository browser