// Handle Git SVN-clone\r
if(dlg.m_bSVN)\r
{\r
- WIN32_FILE_ATTRIBUTE_DATA attribs;\r
- if(GetFileAttributesEx(dlg.m_Directory, GetFileExInfoStandard, &attribs))\r
- {\r
- if(!(attribs.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))\r
- {\r
- CString errstr;\r
- errstr.Format(_T("%s is not valid directory"),dlg.m_Directory);\r
- CMessageBox::Show(NULL,errstr,_T("TortoiseGit"),MB_OK|MB_ICONERROR);\r
- return FALSE;\r
- }\r
- } \r
- else\r
- {\r
- DWORD err = GetLastError();\r
- if(err == ERROR_PATH_NOT_FOUND)\r
- {\r
- if(!CAppUtils::CreateMultipleDirectory(dlg.m_Directory))\r
- {\r
- CString errstr;\r
- errstr.Format(_T("Fail create dir: %s"),dlg.m_Directory);\r
- CMessageBox::Show(NULL,errstr,_T("TortoiseGit"),MB_OK|MB_ICONERROR);\r
- return FALSE;\r
- }\r
\r
- }\r
- else\r
- {\r
- CMessageBox::Show(NULL,_T("Unknow ERROR"),_T("TortoiseGit"),MB_OK|MB_ICONERROR);\r
- return FALSE;\r
- }\r
- }\r
-\r
- g_Git.m_CurrentDir=dlg.m_Directory;\r
- cmd.Format(_T("git.exe svn clone \"%s\" "),\r
- url);\r
+ //g_Git.m_CurrentDir=dlg.m_Directory;\r
+ cmd.Format(_T("git.exe svn clone \"%s\" \"%s\""),\r
+ url,dlg.m_Directory);\r
\r
if(dlg.m_bSVNTrunk)\r
cmd+=_T(" -T ")+dlg.m_strSVNTrunk;\r
#include "RenameDlg.h"\r
#include "Git.h"\r
#include "ShellUpdater.h"\r
+#include "rebasedlg.h"\r
\r
bool SVNRebaseCommand::Execute()\r
{\r
- return true;\r
+ bool bRet =false;\r
+ \r
+ if(!g_Git.CheckCleanWorkTree())\r
+ {\r
+ if(CMessageBox::Show(NULL, IDS_ERROR_NOCLEAN_STASH,IDS_APPNAME,MB_YESNO|MB_ICONINFORMATION)==IDYES)\r
+ {\r
+ CString cmd,out;\r
+ cmd=_T("git.exe stash");\r
+ if(g_Git.Run(cmd,&out,CP_ACP))\r
+ {\r
+ CMessageBox::Show(NULL,out,_T("TortoiseGit"),MB_OK);\r
+ return false;\r
+ }\r
+\r
+ }else\r
+ {\r
+ return false;\r
+ }\r
+ }\r
+\r
+ CRebaseDlg dlg;\r
+ \r
+ dlg.m_PreCmd=_T("git.exe fetch");\r
+ dlg.m_Upstream=_T("remotes/trunk");\r
+\r
+ if(dlg.DoModal() == IDOK)\r
+ {\r
+ bRet=true;\r
+ }\r
+ return bRet;\r
}\r
CStatic m_CtrlStatusText;\r
CBalloon m_tooltips;\r
\r
+ CString m_PreCmd;\r
+\r
BOOL m_bPickAll;\r
BOOL m_bSquashAll;\r
BOOL m_bEditAll;\r
>\r
</File>\r
<File\r
- RelativePath="..\Resources\copy.ico"\r
+ RelativePath=".\copy.ico"\r
>\r
</File>\r
<File\r
- RelativePath=".\copy.ico"\r
+ RelativePath="..\Resources\copy.ico"\r
>\r
</File>\r
<File\r
>\r
</File>\r
<File\r
- RelativePath=".\explorer.ico"\r
+ RelativePath="..\Resources\explorer.ico"\r
>\r
</File>\r
<File\r
- RelativePath="..\Resources\explorer.ico"\r
+ RelativePath=".\explorer.ico"\r
>\r
</File>\r
<File\r
>\r
</File>\r
<File\r
- RelativePath="..\Resources\newfolder.ico"\r
+ RelativePath=".\newfolder.ico"\r
>\r
</File>\r
<File\r
- RelativePath=".\newfolder.ico"\r
+ RelativePath="..\Resources\newfolder.ico"\r
>\r
</File>\r
<File\r
>\r
</File>\r
<File\r
- RelativePath="..\Resources\refresh.ico"\r
+ RelativePath=".\refresh.ico"\r
>\r
</File>\r
<File\r
- RelativePath=".\refresh.ico"\r
+ RelativePath="..\Resources\refresh.ico"\r
>\r
</File>\r
<File\r
>\r
</File>\r
<File\r
- RelativePath=".\save.ico"\r
+ RelativePath="..\Resources\save.ico"\r
>\r
</File>\r
<File\r
- RelativePath="..\Resources\save.ico"\r
+ RelativePath=".\save.ico"\r
>\r
</File>\r
<File\r
>\r
</File>\r
<File\r
- RelativePath="..\Resources\up.ico"\r
+ RelativePath=".\up.ico"\r
>\r
</File>\r
<File\r
- RelativePath=".\up.ico"\r
+ RelativePath="..\Resources\up.ico"\r
>\r
</File>\r
<File\r