From 933021db3460495ff482ea328709e5cf9f2e6d34 Mon Sep 17 00:00:00 2001 From: Frank Li Date: Tue, 23 Mar 2010 21:18:27 +0800 Subject: [PATCH] TGitCache test application basic work. Signed-off-by: Frank Li --- src/Git/GitStatus.cpp | 10 ++- src/Git/GitStatus.h | 2 +- src/TGitCache/CachedDirectory.cpp | 164 +++++++++++++++++--------------------- src/TGitCache/CachedDirectory.h | 1 + src/TGitCache/GitStatusCache.h | 1 + src/TortoiseGit.sln | 66 +++++++++++++++ src/TortoiseShell/IconOverlay.cpp | 13 ++- test/Cache/Cache.vcproj | 20 ++--- test/Cache/CacheDlg.cpp | 15 ++-- test/Cache/CacheDlg.h | 4 +- test/Cache/stdafx.h | 5 -- 11 files changed, 179 insertions(+), 122 deletions(-) diff --git a/src/Git/GitStatus.cpp b/src/Git/GitStatus.cpp index 0023576fe..1b626535c 100644 --- a/src/Git/GitStatus.cpp +++ b/src/Git/GitStatus.cpp @@ -983,7 +983,7 @@ void GitStatus::ClearFilter() #endif // _MFC_VER -typedef CComCritSecLock AutoLocker; +typedef CComCritSecLock CAutoLocker; int GitStatus::GetFileStatus(CString &gitdir,CString &path,git_wc_status_kind * status,BOOL IsFull, BOOL IsRecursive,FIll_STATUS_CALLBACK callback,void *pData) { @@ -991,7 +991,7 @@ int GitStatus::GetFileStatus(CString &gitdir,CString &path,git_wc_status_kind * TCHAR oldpath[MAX_PATH+1]; memset(oldpath,0,MAX_PATH+1); - AutoLocker lock(g_Git.m_critGitDllSec); + CAutoLocker lock(g_Git.m_critGitDllSec); path.Replace(_T('\\'),_T('/')); @@ -1250,6 +1250,12 @@ int GitStatus::GetDirStatus(CString &gitdir,CString &path,git_wc_status_kind * s CString fullpath=gitdir; fullpath += _T("\\"); fullpath += (*it).m_FileName; + if( !IsRecursive ) + { + //skip child directory + if((*it).m_FileName.Find(_T('/'), path.GetLength()) + 1>0) + continue; + } if( g_Git.GetFileModifyTime(fullpath,&time) ) { *status = git_wc_status_deleted; diff --git a/src/Git/GitStatus.h b/src/Git/GitStatus.h index dd76f2965..e81e21176 100644 --- a/src/Git/GitStatus.h +++ b/src/Git/GitStatus.h @@ -175,7 +175,7 @@ typedef void (*FIll_STATUS_CALLBACK)(CString &path,git_wc_status_kind status,voi */ class GitStatus { -protected: +public: static int GetFileStatus(CString &gitdir,CString &path,git_wc_status_kind * status,BOOL IsFull=false, BOOL IsRecursive=false,FIll_STATUS_CALLBACK callback=NULL,void *pData=NULL); static int GetDirStatus(CString &gitdir,CString &path,git_wc_status_kind * status,BOOL IsFull=false, BOOL IsRecursive=false,FIll_STATUS_CALLBACK callback=NULL,void *pData=NULL); diff --git a/src/TGitCache/CachedDirectory.cpp b/src/TGitCache/CachedDirectory.cpp index c85ae6efa..aedceb112 100644 --- a/src/TGitCache/CachedDirectory.cpp +++ b/src/TGitCache/CachedDirectory.cpp @@ -398,42 +398,11 @@ CStatusCacheEntry CCachedDirectory::GetStatusForMember(const CTGitPath& path, bo m_currentStatusFetchingPath = m_directoryPath; m_currentStatusFetchingPathTicks = GetTickCount(); } - ATLTRACE(_T("git_enum_files for '%s' (req %s)\n"), m_directoryPath.GetWinPath(), path.GetWinPath()); + //ATLTRACE(_T("git_enum_files for '%s' (req %s)\n"), m_directoryPath.GetWinPath(), path.GetWinPath()); - CString sProjectRoot; - m_directoryPath.HasAdminDir(&sProjectRoot); - ATLASSERT( !m_directoryPath.IsEmpty() ); + + BOOL pErr = EnumFiles(); - LPCTSTR lpszSubPath = NULL; - CString sSubPath; - CString s = m_directoryPath.GetDirectory().GetWinPathString(); - if (s.GetLength() > sProjectRoot.GetLength()) - { - sSubPath = s.Right(s.GetLength() - sProjectRoot.GetLength()); - lpszSubPath = sSubPath; - // skip initial slash if necessary - if (*lpszSubPath == _T('\\')) - lpszSubPath++; - } -//MessageBoxA(NULL, CStringA(sProjectRoot), sSubPath, MB_OK); -//OutputDebugStringA("###");OutputDebugStringW(sProjectRoot);OutputDebugStringA(" - ");OutputDebugStringA(sSubPath);OutputDebugStringA("\r\n"); - BOOL pErr = !wgEnumFiles(sProjectRoot, lpszSubPath, WGEFF_NoRecurse|WGEFF_FullPath, &GetStatusCallback, this); - - /*git_error_t* pErr = svn_client_status4 ( - NULL, - m_directoryPath.GetSVNApiPath(subPool), - &revision, - GetStatusCallback, - this, - svn_depth_immediates, - TRUE, //getall - FALSE, - TRUE, //noignore - FALSE, //ignore externals - NULL, //changelists - CGitStatusCache::Instance().m_svnHelp.ClientContext(), - subPool - );*/ { AutoLocker pathlock(m_critSecPath); m_currentStatusFetchingPath.Reset(); @@ -510,6 +479,75 @@ CStatusCacheEntry CCachedDirectory::GetStatusForMember(const CTGitPath& path, bo return CStatusCacheEntry(); } +int CCachedDirectory::EnumFiles() +{ + CString sProjectRoot; + m_directoryPath.HasAdminDir(&sProjectRoot); + ATLASSERT( !m_directoryPath.IsEmpty() ); + + LPCTSTR lpszSubPath = NULL; + CString sSubPath; + CString s = m_directoryPath.GetDirectory().GetWinPathString(); + if (s.GetLength() > sProjectRoot.GetLength()) + { + sSubPath = s.Right(s.GetLength() - sProjectRoot.GetLength()); + lpszSubPath = sSubPath; + // skip initial slash if necessary + if (*lpszSubPath == _T('\\')) + lpszSubPath++; + } + + WIN32_FIND_DATA data; + CString str = m_directoryPath.GetWinPathString() + _T("\\*.*"); + git_wc_status_kind status; + + git_wc_status2_t status2; + + GitStatus *pStatus = &CGitStatusCache::Instance().m_GitStatus; + + pStatus->GetDirStatus(sProjectRoot, sSubPath, &status, true, false); + status2.prop_status = status2.text_status = status; + this->m_ownStatus.SetStatus(&status2); + + CTGitPath gitPath; + + HANDLE handle = FindFirstFile(str,&data); + while(FindNextFile(handle,&data)) + { + if( _tcsnccmp(data.cFileName, _T(".."),2) == 0) + continue; + if( _tcsnccmp(data.cFileName, _T("."),1) == 0) + continue; + + if(data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + { + status = git_wc_status_none; + CString subpath; + subpath = sSubPath+_T("\\")+data.cFileName, + pStatus->GetDirStatus(sProjectRoot, subpath, &status, true, false); + if (m_bRecursive) + { + gitPath.SetFromWin(subpath); + + //just need crawling tracked directory + if(status > git_wc_status_ignored) + CGitStatusCache::Instance().AddFolderForCrawling(gitPath); + } + + AutoLocker lock(m_critSec); + m_childDirectories[gitPath] = status; + + }else + { + status = git_wc_status_none; + pStatus->GetFileStatus(sProjectRoot, sSubPath+data.cFileName, &status,true, false); + } + + status2.prop_status=status2.text_status=status; + AddEntry(gitPath, &status2); + } + return 0; +} void CCachedDirectory::AddEntry(const CTGitPath& path, const git_wc_status2_t* pGitStatus, DWORD validuntil /* = 0*/) { @@ -641,64 +679,6 @@ BOOL CCachedDirectory::GetStatusCallback(const struct wgFile_s *pFile, void *pUs } } } -#if 0 - else - { - svnPath.SetFromGit(path); - // Subversion returns no 'entry' field for versioned folders if they're - // part of another working copy (nested layouts). - // So we have to make sure that such an 'unversioned' folder really - // is unversioned. - if (((status->text_status == git_wc_status_unversioned)||(status->text_status == git_wc_status_missing))&&(!svnPath.IsEquivalentToWithoutCase(pThis->m_directoryPath))&&(svnPath.IsDirectory())) - { - if (svnPath.HasAdminDir()) - { - CGitStatusCache::Instance().AddFolderForCrawling(svnPath); - // Mark the directory as 'versioned' (status 'normal' for now). - // This initial value will be overwritten from below some time later - { - AutoLocker lock(pThis->m_critSec); - pThis->m_childDirectories[svnPath] = git_wc_status_normal; - } - // Make sure the entry is also in the cache - CGitStatusCache::Instance().GetDirectoryCacheEntry(svnPath); - // also mark the status in the status object as normal - status->text_status = git_wc_status_normal; - } - } - else if (status->text_status == git_wc_status_external) - { - CGitStatusCache::Instance().AddFolderForCrawling(svnPath); - // Mark the directory as 'versioned' (status 'normal' for now). - // This initial value will be overwritten from below some time later - { - AutoLocker lock(pThis->m_critSec); - pThis->m_childDirectories[svnPath] = git_wc_status_normal; - } - // we have added a directory to the child-directory list of this - // directory. We now must make sure that this directory also has - // an entry in the cache. - CGitStatusCache::Instance().GetDirectoryCacheEntry(svnPath); - // also mark the status in the status object as normal - status->text_status = git_wc_status_normal; - } - else - { - if (svnPath.IsDirectory()) - { - AutoLocker lock(pThis->m_critSec); - pThis->m_childDirectories[svnPath] = GitStatus::GetMoreImportant(status->text_status, status->prop_status); - } - else if ((CGitStatusCache::Instance().IsUnversionedAsModified())&&(status->text_status != git_wc_status_missing)) - { - // make this unversioned item change the most important status of this - // folder to modified if it doesn't already have another status - if (pThis->m_mostImportantFileStatus != git_wc_status_added) - pThis->m_mostImportantFileStatus = GitStatus::GetMoreImportant(pThis->m_mostImportantFileStatus, git_wc_status_modified); - } - } - } -#endif pThis->AddEntry(svnPath, status); diff --git a/src/TGitCache/CachedDirectory.h b/src/TGitCache/CachedDirectory.h index 4d32ec099..a02682acb 100644 --- a/src/TGitCache/CachedDirectory.h +++ b/src/TGitCache/CachedDirectory.h @@ -38,6 +38,7 @@ public: CCachedDirectory(const CTGitPath& directoryPath); ~CCachedDirectory(void); CStatusCacheEntry GetStatusForMember(const CTGitPath& path, bool bRecursive, bool bFetch = true); + int EnumFiles(); CStatusCacheEntry GetOwnStatus(bool bRecursive); bool IsOwnStatusValid() const; void Invalidate(); diff --git a/src/TGitCache/GitStatusCache.h b/src/TGitCache/GitStatusCache.h index 0e31e6f58..4672d7aaf 100644 --- a/src/TGitCache/GitStatusCache.h +++ b/src/TGitCache/GitStatusCache.h @@ -49,6 +49,7 @@ public: static bool SaveCache(); public: + GitStatus m_GitStatus; /// Refreshes the cache. void Refresh(); diff --git a/src/TortoiseGit.sln b/src/TortoiseGit.sln index 7025fc7df..9a73c0090 100644 --- a/src/TortoiseGit.sln +++ b/src/TortoiseGit.sln @@ -152,6 +152,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GitIndexTest", "GitIndexTes {7CA5B1EB-8CC9-40A6-96D8-83649C1A870B} = {7CA5B1EB-8CC9-40A6-96D8-83649C1A870B} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cache", "..\test\Cache\Cache.vcproj", "{948733DE-FC5A-46C2-8CD6-429017508D63}" + ProjectSection(ProjectDependencies) = postProject + {4F0A55DE-DAFD-4A0B-A03D-2C14CB77E08F} = {4F0A55DE-DAFD-4A0B-A03D-2C14CB77E08F} + {7CA5B1EB-8CC9-40A6-96D8-83649C1A870B} = {7CA5B1EB-8CC9-40A6-96D8-83649C1A870B} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution debug_static|Mixed Platforms = debug_static|Mixed Platforms @@ -2314,6 +2320,66 @@ Global {1A8B6349-1C68-4BDC-8095-8EEF80310633}.Release|Win32.ActiveCfg = Release|Win32 {1A8B6349-1C68-4BDC-8095-8EEF80310633}.Release|Win32.Build.0 = Release|Win32 {1A8B6349-1C68-4BDC-8095-8EEF80310633}.Release|x64.ActiveCfg = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.debug_static|Mixed Platforms.ActiveCfg = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.debug_static|Mixed Platforms.Build.0 = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.debug_static|Win32.ActiveCfg = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.debug_static|Win32.Build.0 = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.debug_static|x64.ActiveCfg = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.Debug|Win32.ActiveCfg = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.Debug|Win32.Build.0 = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.Debug|x64.ActiveCfg = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.DLL ASM Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.DLL ASM Debug|Mixed Platforms.Build.0 = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.DLL ASM Debug|Win32.ActiveCfg = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.DLL ASM Debug|Win32.Build.0 = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.DLL ASM Debug|x64.ActiveCfg = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.DLL ASM Release|Mixed Platforms.ActiveCfg = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.DLL ASM Release|Mixed Platforms.Build.0 = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.DLL ASM Release|Win32.ActiveCfg = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.DLL ASM Release|Win32.Build.0 = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.DLL ASM Release|x64.ActiveCfg = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.DLL Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.DLL Debug|Mixed Platforms.Build.0 = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.DLL Debug|Win32.ActiveCfg = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.DLL Debug|Win32.Build.0 = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.DLL Debug|x64.ActiveCfg = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.DLL Release|Mixed Platforms.ActiveCfg = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.DLL Release|Mixed Platforms.Build.0 = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.DLL Release|Win32.ActiveCfg = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.DLL Release|Win32.Build.0 = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.DLL Release|x64.ActiveCfg = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.LIB ASM Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.LIB ASM Debug|Mixed Platforms.Build.0 = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.LIB ASM Debug|Win32.ActiveCfg = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.LIB ASM Debug|Win32.Build.0 = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.LIB ASM Debug|x64.ActiveCfg = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.LIB ASM Release|Mixed Platforms.ActiveCfg = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.LIB ASM Release|Mixed Platforms.Build.0 = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.LIB ASM Release|Win32.ActiveCfg = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.LIB ASM Release|Win32.Build.0 = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.LIB ASM Release|x64.ActiveCfg = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.LIB Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.LIB Debug|Mixed Platforms.Build.0 = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.LIB Debug|Win32.ActiveCfg = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.LIB Debug|Win32.Build.0 = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.LIB Debug|x64.ActiveCfg = Debug|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.LIB Release|Mixed Platforms.ActiveCfg = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.LIB Release|Mixed Platforms.Build.0 = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.LIB Release|Win32.ActiveCfg = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.LIB Release|Win32.Build.0 = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.LIB Release|x64.ActiveCfg = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.release_static|Mixed Platforms.ActiveCfg = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.release_static|Mixed Platforms.Build.0 = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.release_static|Win32.ActiveCfg = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.release_static|Win32.Build.0 = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.release_static|x64.ActiveCfg = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.Release|Mixed Platforms.Build.0 = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.Release|Win32.ActiveCfg = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.Release|Win32.Build.0 = Release|Win32 + {948733DE-FC5A-46C2-8CD6-429017508D63}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/TortoiseShell/IconOverlay.cpp b/src/TortoiseShell/IconOverlay.cpp index c8b5a338d..03d7a3a39 100644 --- a/src/TortoiseShell/IconOverlay.cpp +++ b/src/TortoiseShell/IconOverlay.cpp @@ -137,9 +137,20 @@ STDMETHODIMP CShellExt::IsMemberOf(LPCWSTR pwszPath, DWORD /*dwAttrib*/) { case ShellCache::exe: { + CTGitPath tpath(pPath); + if(!tpath.HasAdminDir()) + { + status = git_wc_status_none; + break; + } + if(tpath.IsAdminDir()) + { + status = git_wc_status_none; + break; + } TSVNCacheResponse itemStatus; SecureZeroMemory(&itemStatus, sizeof(itemStatus)); - if (m_remoteCacheLink.GetStatusFromRemoteCache(CTGitPath(pPath), &itemStatus, true)) + if (m_remoteCacheLink.GetStatusFromRemoteCache(tpath, &itemStatus, true)) { status = GitStatus::GetMoreImportant(itemStatus.m_status.text_status, itemStatus.m_status.prop_status); /* if ((itemStatus.m_kind == git_node_file)&&(status == git_wc_status_normal)&&((itemStatus.m_needslock && itemStatus.m_owner[0]==0)||(itemStatus.m_readonly))) diff --git a/test/Cache/Cache.vcproj b/test/Cache/Cache.vcproj index 1c511e86c..55da9484c 100644 --- a/test/Cache/Cache.vcproj +++ b/test/Cache/Cache.vcproj @@ -45,7 +45,7 @@ + + @@ -248,15 +252,7 @@ > - - - - SetWindowText(starttime.Format(_T("%H:%M:%S"))); @@ -134,14 +135,14 @@ UINT CCacheDlg::TestThread() CString sNumber; srand(GetTickCount()); - for (int i=0; i < 100000; ++i) + for (int i=0; i < 1; ++i) { CString filepath; - do { + //do { filepath = m_filelist.GetAt(rand() % m_filelist.GetCount()); - } while(filepath.Find(_T(".svn"))>=0); + //}while(filepath.Find(_T(".git"))>=0); GetDlgItem(IDC_FILEPATH)->SetWindowText(filepath); - GetStatusFromRemoteCache(CTSVNPath(filepath), true); + GetStatusFromRemoteCache(CTGitPath(filepath), true); sNumber.Format(_T("%d"), i); GetDlgItem(IDC_DONE)->SetWindowText(sNumber); if ((GetTickCount()%10)==1) @@ -241,7 +242,7 @@ void CCacheDlg::ClosePipe() } } -bool CCacheDlg::GetStatusFromRemoteCache(const CTSVNPath& Path, bool bRecursive) +bool CCacheDlg::GetStatusFromRemoteCache(const CTGitPath& Path, bool bRecursive) { if(!EnsurePipeOpen()) { @@ -423,7 +424,7 @@ UINT CCacheDlg::WatchTestThread() CString sNumber; srand(GetTickCount()); filepath = m_filelist.GetAt(rand() % m_filelist.GetCount()); - GetStatusFromRemoteCache(CTSVNPath(m_sRootPath), false); + GetStatusFromRemoteCache(CTGitPath(m_sRootPath), false); for (int i=0; i < 10000; ++i) { filepath = m_filelist.GetAt(rand() % m_filelist.GetCount()); diff --git a/test/Cache/CacheDlg.h b/test/Cache/CacheDlg.h index de36c5b90..56d87e337 100644 --- a/test/Cache/CacheDlg.h +++ b/test/Cache/CacheDlg.h @@ -17,7 +17,7 @@ // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. // #pragma once -#include "TSVNPath.h" +#include "TGitPath.h" // CCacheDlg dialog class CCacheDlg : public CDialog @@ -56,7 +56,7 @@ protected: UINT TestThread(); void ClosePipe(); bool EnsurePipeOpen(); - bool GetStatusFromRemoteCache(const CTSVNPath& Path, bool bRecursive); + bool GetStatusFromRemoteCache(const CTGitPath& Path, bool bRecursive); void RemoveFromCache(const CString& path); void TouchFile(const CString& path); diff --git a/test/Cache/stdafx.h b/test/Cache/stdafx.h index e31c7184b..971c5aeae 100644 --- a/test/Cache/stdafx.h +++ b/test/Cache/stdafx.h @@ -67,10 +67,5 @@ using namespace ATL; #include #pragma warning(pop) -#include "svn_wc.h" -#include "svn_client.h" -#include "svn_path.h" -#include "svn_pools.h" - typedef CComCritSecLock AutoLocker; -- 2.11.4.GIT