#include "RenameCommand.h"\r
\r
#include "MessageBox.h"\r
-#include "SVNProgressDlg.h"\r
-#include "ProgressDlg.h"\r
+//#include "SVNProgressDlg.h"\r
+//#include "ProgressDlg.h"\r
#include "RenameDlg.h"\r
#include "InputLogDlg.h"\r
-#include "SVN.h"\r
+#include "Git.h"\r
#include "DirFileEnum.h"\r
#include "ShellUpdater.h"\r
\r
{\r
bool bRet = false;\r
CString filename = cmdLinePath.GetFileOrDirectoryName();\r
- CString basePath = cmdLinePath.GetContainingDirectory().GetWinPathString();\r
- ::SetCurrentDirectory(basePath);\r
+ CString basePath = cmdLinePath.GetContainingDirectory().GetGitPathString();\r
+ //::SetCurrentDirectory(basePath);\r
\r
// show the rename dialog until the user either cancels or enters a new\r
// name (one that's different to the original name\r
sNewName = dlg.m_name;\r
} while(PathIsRelative(sNewName) && !PathIsURL(sNewName) && (sNewName.IsEmpty() || (sNewName.Compare(filename)==0)));\r
\r
+ if(!basePath.IsEmpty())\r
+ sNewName=basePath+"/"+sNewName;\r
+\r
+ CString cmd;\r
+ CString output;\r
+ cmd.Format(_T("git.cmd mv \"%s\" \"%s\""),\r
+ cmdLinePath.GetGitPathString(),\r
+ sNewName);\r
+ \r
+ if(g_Git.Run(cmd,&output))\r
+ {\r
+ CMessageBox::Show(hwndExplorer, output, _T("TortoiseGit"), MB_OK);\r
+ }\r
+\r
+#if 0\r
TRACE(_T("rename file %s to %s\n"), (LPCTSTR)cmdLinePath.GetWinPathString(), (LPCTSTR)sNewName);\r
CTSVNPath destinationPath(basePath);\r
if (PathIsRelative(sNewName) && !PathIsURL(sNewName))\r
}\r
}\r
}\r
+#endif\r
return bRet;\r
}\r