#include "SettingsCommand.h"\r
#include "ConflictEditorCommand.h"\r
#include "CleanupCommand.h"\r
+#include "RebaseCommand.h"\r
\r
#if 0\r
\r
cmdRebuildIconCache,\r
cmdRelocate,\r
cmdRemove,\r
+ cmdRebase,\r
cmdRename,\r
cmdRepoBrowser,\r
cmdRepoCreate,\r
{ cmdRebuildIconCache,_T("rebuildiconcache") },\r
{ cmdRelocate, _T("relocate") },\r
{ cmdRemove, _T("remove") },\r
+ { cmdRebase, _T("rebase") },\r
{ cmdRename, _T("rename") },\r
{ cmdRepoBrowser, _T("repobrowser") },\r
{ cmdRepoCreate, _T("repocreate") },\r
return new ConflictEditorCommand;\r
case cmdCleanup:\r
return new CleanupCommand;\r
+ case cmdRebase:\r
+ return new RebaseCommand;\r
#if 0\r
\r
case cmdCat:\r
--- /dev/null
+// TortoiseSVN - a Windows shell extension for easy version control\r
+\r
+// Copyright (C) 2007-2008 - TortoiseSVN\r
+\r
+// This program is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU General Public License\r
+// as published by the Free Software Foundation; either version 2\r
+// of the License, or (at your option) any later version.\r
+\r
+// This program is distributed in the hope that it will be useful,\r
+// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+// GNU General Public License for more details.\r
+\r
+// You should have received a copy of the GNU General Public License\r
+// along with this program; if not, write to the Free Software Foundation,\r
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
+//\r
+#include "StdAfx.h"\r
+#include "RebaseCommand.h"\r
+\r
+#include "MessageBox.h"\r
+//#include "SVNProgressDlg.h"\r
+//#include "ProgressDlg.h"\r
+#include "RebaseDlg.h"\r
+#include "InputLogDlg.h"\r
+#include "Git.h"\r
+#include "DirFileEnum.h"\r
+#include "ShellUpdater.h"\r
+\r
+bool RebaseCommand::Execute()\r
+{\r
+ bool bRet =false;\r
+ CRebaseDlg dlg;\r
+ if(dlg.DoModal() == IDOK)\r
+ {\r
+ bRet=true;\r
+ }\r
+ return bRet;\r
+}\r
--- /dev/null
+// TortoiseSVN - a Windows shell extension for easy version control\r
+\r
+// Copyright (C) 2007 - TortoiseSVN\r
+\r
+// This program is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU General Public License\r
+// as published by the Free Software Foundation; either version 2\r
+// of the License, or (at your option) any later version.\r
+\r
+// This program is distributed in the hope that it will be useful,\r
+// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+// GNU General Public License for more details.\r
+\r
+// You should have received a copy of the GNU General Public License\r
+// along with this program; if not, write to the Free Software Foundation,\r
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
+//\r
+#pragma once\r
+#include "Command.h"\r
+\r
+/**\r
+ * \ingroup TortoiseProc\r
+ * Renames files and folders.\r
+ */\r
+class RebaseCommand : public Command\r
+{\r
+public:\r
+ /**\r
+ * Executes the command.\r
+ */\r
+ virtual bool Execute();\r
+};\r
+\r
+\r
\r
// CRebaseDlg dialog\r
\r
-IMPLEMENT_DYNAMIC(CRebaseDlg, CDialog)\r
+IMPLEMENT_DYNAMIC(CRebaseDlg, CResizableStandAloneDialog)\r
\r
CRebaseDlg::CRebaseDlg(CWnd* pParent /*=NULL*/)\r
- : CDialog(CRebaseDlg::IDD, pParent)\r
- , m_bPickupAll(false)\r
- , m_bSquashALL(false)\r
+ : CResizableStandAloneDialog(CRebaseDlg::IDD, pParent)\r
, m_bPickAll(FALSE)\r
, m_bSquashAll(FALSE)\r
, m_bEditAll(FALSE)\r
}\r
\r
\r
-BEGIN_MESSAGE_MAP(CRebaseDlg, CDialog)\r
+BEGIN_MESSAGE_MAP(CRebaseDlg, CResizableStandAloneDialog)\r
ON_BN_CLICKED(IDC_PICK_ALL, &CRebaseDlg::OnBnClickedPickAll)\r
ON_BN_CLICKED(IDC_SQUASH_ALL, &CRebaseDlg::OnBnClickedSquashAll)\r
ON_BN_CLICKED(IDC_EDIT_ALL, &CRebaseDlg::OnBnClickedEditAll)\r
ON_BN_CLICKED(IDC_REBASE_SPLIT, &CRebaseDlg::OnBnClickedRebaseSplit)\r
END_MESSAGE_MAP()\r
\r
-\r
+BOOL CRebaseDlg::OnInitDialog()\r
+{\r
+ CResizableStandAloneDialog::OnInitDialog();\r
+\r
+ CRect rectDummy;\r
+ //IDC_REBASE_DUMY_TAB\r
+ \r
+ CWnd *pwnd=this->GetDlgItem(IDC_REBASE_DUMY_TAB);\r
+ pwnd->GetWindowRect(&rectDummy);\r
+ \r
+ if (!m_ctrlTabCtrl.Create(CMFCTabCtrl::STYLE_FLAT, rectDummy, this, 0))\r
+ {\r
+ TRACE0("Failed to create output tab window\n");\r
+ return FALSE; // fail to create\r
+ }\r
+ m_ctrlTabCtrl.SetResizeMode(CMFCTabCtrl::RESIZE_NO);\r
+ // Create output panes:\r
+ //const DWORD dwStyle = LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL;\r
+ const DWORD dwStyle =LVS_REPORT | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_OWNERDATA | WS_BORDER | WS_TABSTOP |LVS_SINGLESEL |WS_CHILD | WS_VISIBLE;\r
+\r
+ if (! this->m_FileListCtrl.Create(dwStyle,rectDummy,&this->m_ctrlTabCtrl,0) )\r
+ {\r
+ TRACE0("Failed to create output windows\n");\r
+ return FALSE; // fail to create\r
+ }\r
+\r
+ if( ! this->m_LogMessageCtrl.Create(_T("Scintilla"),_T("source"),0,rectDummy,&m_ctrlTabCtrl,0,0) )\r
+ {\r
+ TRACE0("Failed to create log message control");\r
+ return FALSE;\r
+ }\r
+\r
+ m_ctrlTabCtrl.AddTab(&m_FileListCtrl,_T("Modified File"));\r
+ m_ctrlTabCtrl.AddTab(&m_LogMessageCtrl,_T("Log Message"),1);\r
+\r
+ return TRUE;\r
+}\r
// CRebaseDlg message handlers\r
\r
void CRebaseDlg::OnBnClickedPickAll()\r
#pragma once\r
#include "afxcmn.h"\r
#include "afxwin.h"\r
-\r
-\r
+#include "StandAloneDlg.h"\r
+#include "GitStatusListCtrl.h"\r
+#include "SciEdit.h"\r
// CRebaseDlg dialog\r
\r
-class CRebaseDlg : public CDialog\r
+class CRebaseDlg : public CResizableStandAloneDialog\r
{\r
DECLARE_DYNAMIC(CRebaseDlg)\r
\r
\r
protected:\r
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support\r
-\r
+ virtual BOOL OnInitDialog();\r
DECLARE_MESSAGE_MAP()\r
public:\r
- bool m_bPickupAll;\r
- bool m_bSquashALL;\r
- \r
+ \r
afx_msg void OnBnClickedPickAll();\r
afx_msg void OnBnClickedSquashAll();\r
afx_msg void OnBnClickedEditAll();\r
BOOL m_bPickAll;\r
BOOL m_bSquashAll;\r
BOOL m_bEditAll;\r
+\r
+ CMFCTabCtrl m_ctrlTabCtrl;\r
+ CGitStatusListCtrl m_FileListCtrl;\r
+ CSciEdit m_LogMessageCtrl;\r
};\r
>\r
</File>\r
<File\r
- RelativePath=".\RebaseDlg.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\RebaseDlg.h"\r
- >\r
- </File>\r
- <File\r
RelativePath="..\TortoiseShell\resource.h"\r
>\r
</File>\r
</File>\r
</Filter>\r
<Filter\r
- Name="merge"\r
- >\r
- <File\r
- RelativePath=".\Commands\MergeCommand.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\Commands\MergeCommand.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\MergeDlg.cpp"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\MergeDlg.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
Name="Export"\r
>\r
<File\r
<Filter\r
Name="Rebase"\r
>\r
+ <File\r
+ RelativePath=".\Commands\RebaseCommand.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\Commands\RebaseCommand.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\RebaseDlg.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\RebaseDlg.h"\r
+ >\r
+ </File>\r
+ </Filter>\r
+ <Filter\r
+ Name="merge"\r
+ >\r
+ <File\r
+ RelativePath=".\Commands\MergeCommand.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\Commands\MergeCommand.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\MergeDlg.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\MergeDlg.h"\r
+ >\r
+ </File>\r
</Filter>\r
</Filter>\r
<Filter\r