Signed-off-by: Frank Li <lznuaa@gmail.com>
//progDlg.SetProjectProperties(props);\r
progDlg.SetItemCount(dlg.m_pathList.GetCount());\r
progDlg.DoModal();\r
//progDlg.SetProjectProperties(props);\r
progDlg.SetItemCount(dlg.m_pathList.GetCount());\r
progDlg.DoModal();\r
+\r
+ CShellUpdater::Instance().AddPathsForUpdate(dlg.m_pathList);\r
+\r
bRet = !progDlg.DidErrorsOccur();\r
\r
}\r
// }\r
}\r
bRet = !progDlg.DidErrorsOccur();\r
\r
}\r
// }\r
}\r
+ CShellUpdater::Instance().Flush();\r
}\r
CMessageBox::Show(hwndExplorer, strMessage, _T("TortoiseSVN"), MB_OK | (strFailedPaths.IsEmpty()?MB_ICONINFORMATION:MB_ICONERROR));\r
#endif\r
}\r
CMessageBox::Show(hwndExplorer, strMessage, _T("TortoiseSVN"), MB_OK | (strFailedPaths.IsEmpty()?MB_ICONINFORMATION:MB_ICONERROR));\r
#endif\r
+ CShellUpdater::Instance().Flush();\r
\r
output.Format(_T("%d files removed"),nPath);\r
\r
\r
output.Format(_T("%d files removed"),nPath);\r
\r
+ CShellUpdater::Instance().AddPathsForUpdate(pathList);\r
+\r
CMessageBox::Show(hwndExplorer, output, _T("TortoiseGit"), MB_ICONINFORMATION|MB_OK);\r
\r
CMessageBox::Show(hwndExplorer, output, _T("TortoiseGit"), MB_ICONINFORMATION|MB_OK);\r
\r
+ CShellUpdater::Instance().Flush();\r
CMessageBox::Show(hwndExplorer, output, _T("TortoiseGit"), MB_OK);\r
}\r
\r
CMessageBox::Show(hwndExplorer, output, _T("TortoiseGit"), MB_OK);\r
}\r
\r
+ CTGitPath newpath;\r
+ newpath.SetFromGit(sNewName);\r
+\r
+ CShellUpdater::Instance().AddPathForUpdate(newpath);\r
#if 0\r
TRACE(_T("rename file %s to %s\n"), (LPCTSTR)cmdLinePath.GetWinPathString(), (LPCTSTR)sNewName);\r
CTSVNPath destinationPath(basePath);\r
#if 0\r
TRACE(_T("rename file %s to %s\n"), (LPCTSTR)cmdLinePath.GetWinPathString(), (LPCTSTR)sNewName);\r
CTSVNPath destinationPath(basePath);\r
+ CShellUpdater::Instance().Flush();\r
#include "CommonResource.h"\r
#include "UnicodeUtils.h"\r
#include "ProgressDlg.h"\r
#include "CommonResource.h"\r
#include "UnicodeUtils.h"\r
#include "ProgressDlg.h"\r
+#include "ShellUpdater.h"\r
\r
#ifdef _DEBUG\r
#define new DEBUG_NEW\r
\r
#ifdef _DEBUG\r
#define new DEBUG_NEW\r
\r
g_Git.Run(cmd,&out,CP_OEMCP);\r
nchecked++;\r
\r
g_Git.Run(cmd,&out,CP_OEMCP);\r
nchecked++;\r
//checkedLists.insert(entry->GetGitPathString());\r
// checkedfiles += _T("\"")+entry->GetGitPathString()+_T("\" ");\r
}\r
//checkedLists.insert(entry->GetGitPathString());\r
// checkedfiles += _T("\"")+entry->GetGitPathString()+_T("\" ");\r
}\r
+\r
+ CShellUpdater::Instance().AddPathForUpdate(*entry);\r
}\r
\r
//if(uncheckedfiles.GetLength()>0)\r
}\r
\r
//if(uncheckedfiles.GetLength()>0)\r
SaveSplitterPos();\r
\r
CResizableStandAloneDialog::OnOK();\r
SaveSplitterPos();\r
\r
CResizableStandAloneDialog::OnOK();\r
+\r
+ CShellUpdater::Instance().Flush();\r
}\r
\r
void CCommitDlg::SaveSplitterPos()\r
}\r
\r
void CCommitDlg::SaveSplitterPos()\r
//\r
#include "StdAfx.h"\r
#include "Shellupdater.h"\r
//\r
#include "StdAfx.h"\r
#include "Shellupdater.h"\r
-#include "../TSVNCache/CacheInterface.h"\r
+#include "../TGitCache/CacheInterface.h"\r
\r
CShellUpdater::CShellUpdater(void)\r
{\r
\r
CShellUpdater::CShellUpdater(void)\r
{\r
- m_hInvalidationEvent = CreateEvent(NULL, FALSE, FALSE, _T("TortoiseSVNCacheInvalidationEvent"));\r
+ m_hInvalidationEvent = CreateEvent(NULL, FALSE, FALSE, _T("TortoiseGitCacheInvalidationEvent"));\r
}\r
\r
CShellUpdater::~CShellUpdater(void)\r
}\r
\r
CShellUpdater::~CShellUpdater(void)\r
* Add a single path for updating.\r
* The update will happen at some suitable time in the future\r
*/\r
* Add a single path for updating.\r
* The update will happen at some suitable time in the future\r
*/\r
-void CShellUpdater::AddPathForUpdate(const CTSVNPath& path)\r
+void CShellUpdater::AddPathForUpdate(const CTGitPath& path)\r
{\r
// Tell the shell extension to purge its cache - we'll redo this when \r
// we actually do the shell-updates, but sometimes there's an earlier update, which\r
{\r
// Tell the shell extension to purge its cache - we'll redo this when \r
// we actually do the shell-updates, but sometimes there's an earlier update, which\r
* Add a list of paths for updating.\r
* The update will happen when the list is destroyed, at the end of execution\r
*/\r
* Add a list of paths for updating.\r
* The update will happen when the list is destroyed, at the end of execution\r
*/\r
-void CShellUpdater::AddPathsForUpdate(const CTSVNPathList& pathList)\r
+void CShellUpdater::AddPathsForUpdate(const CTGitPathList& pathList)\r
{\r
for(int nPath=0; nPath < pathList.GetCount(); nPath++)\r
{\r
{\r
for(int nPath=0; nPath < pathList.GetCount(); nPath++)\r
{\r
NULL, // don't set maximum bytes \r
NULL)) // don't set maximum time \r
{\r
NULL, // don't set maximum bytes \r
NULL)) // don't set maximum time \r
{\r
for(int nPath = 0; nPath < m_pathsForUpdating.GetCount(); nPath++)\r
{\r
for(int nPath = 0; nPath < m_pathsForUpdating.GetCount(); nPath++)\r
{\r
- ATLTRACE(_T("Cache Item Update for %s (%d)\n"), m_pathsForUpdating[nPath].GetDirectory().GetWinPathString(), GetTickCount());\r
- if (!m_pathsForUpdating[nPath].IsDirectory())\r
+ path.SetFromWin(g_Git.m_CurrentDir+_T("\\")+m_pathsForUpdating[nPath].GetDirectory().GetWinPathString());\r
+ ATLTRACE(_T("Cache Item Update for %s (%d)\n"), path.GetDirectory().GetWinPathString(), GetTickCount());\r
+ if (!path.IsDirectory())\r
{\r
// send notifications to the shell for changed files - folders are updated by the cache itself.\r
{\r
// send notifications to the shell for changed files - folders are updated by the cache itself.\r
- SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATH | SHCNF_FLUSHNOWAIT, m_pathsForUpdating[nPath].GetWinPath(), NULL);\r
+ SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATH | SHCNF_FLUSHNOWAIT, path.GetWinPath(), NULL);\r
}\r
DWORD cbWritten; \r
TSVNCacheCommand cmd;\r
cmd.command = TSVNCACHECOMMAND_CRAWL;\r
}\r
DWORD cbWritten; \r
TSVNCacheCommand cmd;\r
cmd.command = TSVNCACHECOMMAND_CRAWL;\r
- wcsncpy_s(cmd.path, MAX_PATH+1, m_pathsForUpdating[nPath].GetDirectory().GetWinPath(), MAX_PATH);\r
+ wcsncpy_s(cmd.path, MAX_PATH+1, path.GetDirectory().GetWinPath(), MAX_PATH);\r
BOOL fSuccess = WriteFile( \r
hPipe, // handle to pipe \r
&cmd, // buffer to write from \r
BOOL fSuccess = WriteFile( \r
hPipe, // handle to pipe \r
&cmd, // buffer to write from \r
/>\r
</Configuration>\r
<Configuration\r
/>\r
</Configuration>\r
<Configuration\r
- Name="Debug|x64"\r
- OutputDirectory="..\..\bin\$(ConfigurationName)64\bin"\r
- IntermediateDirectory="..\..\obj\Utils\$(ConfigurationName)64\"\r
+ Name="Release|Win32"\r
+ OutputDirectory="..\..\bin\$(ConfigurationName)\bin"\r
+ IntermediateDirectory="..\..\obj\Utils\$(ConfigurationName)\"\r
ConfigurationType="4"\r
UseOfMFC="2"\r
ConfigurationType="4"\r
UseOfMFC="2"\r
+ WholeProgramOptimization="1"\r
>\r
<Tool\r
Name="VCPreBuildEventTool"\r
>\r
<Tool\r
Name="VCPreBuildEventTool"\r
/>\r
<Tool\r
Name="VCMIDLTool"\r
/>\r
<Tool\r
Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
/>\r
<Tool\r
Name="VCCLCompilerTool"\r
/>\r
<Tool\r
Name="VCCLCompilerTool"\r
+ Optimization="2"\r
+ EnableIntrinsicFunctions="true"\r
AdditionalIncludeDirectories="../git;../;../ext/scintilla/include;../ext/hunspell;./MiscUi"\r
AdditionalIncludeDirectories="../git;../;../ext/scintilla/include;../ext/hunspell;./MiscUi"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"\r
- MinimalRebuild="true"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="3"\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB"\r
+ RuntimeLibrary="2"\r
+ EnableFunctionLevelLinking="true"\r
UsePrecompiledHeader="2"\r
WarningLevel="3"\r
DebugInformationFormat="3"\r
UsePrecompiledHeader="2"\r
WarningLevel="3"\r
DebugInformationFormat="3"\r
+ DisableSpecificWarnings="4996,4018"\r
/>\r
<Tool\r
Name="VCManagedResourceCompilerTool"\r
/>\r
<Tool\r
Name="VCManagedResourceCompilerTool"\r
/>\r
</Configuration>\r
<Configuration\r
/>\r
</Configuration>\r
<Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="..\..\bin\$(ConfigurationName)\bin"\r
- IntermediateDirectory="..\..\obj\Utils\$(ConfigurationName)\"\r
+ Name="Debug|x64"\r
+ OutputDirectory="..\..\bin\$(ConfigurationName)64\bin"\r
+ IntermediateDirectory="..\..\obj\Utils\$(ConfigurationName)64\"\r
ConfigurationType="4"\r
UseOfMFC="2"\r
ConfigurationType="4"\r
UseOfMFC="2"\r
- WholeProgramOptimization="1"\r
>\r
<Tool\r
Name="VCPreBuildEventTool"\r
>\r
<Tool\r
Name="VCPreBuildEventTool"\r
/>\r
<Tool\r
Name="VCMIDLTool"\r
/>\r
<Tool\r
Name="VCMIDLTool"\r
+ TargetEnvironment="3"\r
/>\r
<Tool\r
Name="VCCLCompilerTool"\r
/>\r
<Tool\r
Name="VCCLCompilerTool"\r
- Optimization="2"\r
- EnableIntrinsicFunctions="true"\r
AdditionalIncludeDirectories="../git;../;../ext/scintilla/include;../ext/hunspell;./MiscUi"\r
AdditionalIncludeDirectories="../git;../;../ext/scintilla/include;../ext/hunspell;./MiscUi"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"\r
- RuntimeLibrary="2"\r
- EnableFunctionLevelLinking="true"\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB"\r
+ MinimalRebuild="true"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="3"\r
UsePrecompiledHeader="2"\r
WarningLevel="3"\r
DebugInformationFormat="3"\r
UsePrecompiledHeader="2"\r
WarningLevel="3"\r
DebugInformationFormat="3"\r
- DisableSpecificWarnings="4996,4018"\r
/>\r
<Tool\r
Name="VCManagedResourceCompilerTool"\r
/>\r
<Tool\r
Name="VCManagedResourceCompilerTool"\r
+ RelativePath=".\ShellUpdater.cpp"\r
+ >\r
+ </File>\r
+ <File\r
RelativePath=".\SoundUtils.cpp"\r
>\r
</File>\r
RelativePath=".\SoundUtils.cpp"\r
>\r
</File>\r
/>\r
</FileConfiguration>\r
<FileConfiguration\r
/>\r
</FileConfiguration>\r
<FileConfiguration\r
>\r
<Tool\r
Name="VCCLCompilerTool"\r
>\r
<Tool\r
Name="VCCLCompilerTool"\r
/>\r
</FileConfiguration>\r
<FileConfiguration\r
/>\r
</FileConfiguration>\r
<FileConfiguration\r
>\r
<Tool\r
Name="VCCLCompilerTool"\r
>\r
<Tool\r
Name="VCCLCompilerTool"\r