OSDN Git Service

initial icon overlay support using the wingit lib
authorMyagi <snowcoder@gmail.com>
Sun, 25 Jan 2009 03:57:58 +0000 (04:57 +0100)
committerFrank Li <lznuaa@gmail.com>
Wed, 28 Jan 2009 03:14:29 +0000 (11:14 +0800)
22 files changed:
ext/wingit/wingit.dll [new file with mode: 0644]
ext/wingit/wingit.h [new file with mode: 0644]
ext/wingit/wingit.lib [new file with mode: 0644]
src/Git/Git.cpp
src/Git/Git.vcproj
src/Git/GitAdminDir.cpp
src/Git/GitFolderStatus.cpp [new file with mode: 0644]
src/Git/GitFolderStatus.h [new file with mode: 0644]
src/Git/GitStatus.cpp
src/Git/GitStatus.h
src/Git/TGitPath.cpp
src/Git/TGitPath.h
src/TGitCache/TSVNCache.vcproj
src/TortoiseGit.sln
src/TortoiseGitSetup/FeaturesFragment.wxi
src/TortoiseGitSetup/StructureFragment.wxi
src/TortoiseProc/TortoiseProc.vcproj
src/TortoiseShell/ContextMenu.cpp
src/TortoiseShell/IconOverlay.cpp
src/TortoiseShell/ShellCache.h
src/TortoiseShell/ShellExt.h
src/TortoiseShell/TortoiseShell.vcproj

diff --git a/ext/wingit/wingit.dll b/ext/wingit/wingit.dll
new file mode 100644 (file)
index 0000000..f70a7a9
Binary files /dev/null and b/ext/wingit/wingit.dll differ
diff --git a/ext/wingit/wingit.h b/ext/wingit/wingit.h
new file mode 100644 (file)
index 0000000..346f5bb
--- /dev/null
@@ -0,0 +1,91 @@
+// wingit.h\r
+//\r
+// Windows GIT wrapper (under msysgit)\r
+//\r
+// This is NOT a full git API, it only exposes a few helper functions that\r
+// third party windows apps might find useful, to avoid having to parse\r
+// console output from the command-line tools.\r
+//\r
+// Make sure wingit.dll is placed in the bin directory of the msysgit installation.\r
+//\r
+// Created by Georg Fischer\r
+\r
+#ifndef _WINGIT_H_\r
+#define _WINGIT_H_\r
+\r
+#define WG_VERSION "0.1.3"\r
+\r
+\r
+#define DLLIMPORT __declspec(dllimport) __stdcall\r
+#define DLLEXPORT __declspec(dllexport) __stdcall\r
+\r
+#ifdef WINGIT_EXPORTS\r
+#define WINGIT_API DLLEXPORT\r
+#else // GAME_EXPORTS\r
+#define WINGIT_API DLLIMPORT\r
+#endif // GAME_EXPORTS\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+\r
+// Flags for wgEnumFiles\r
+enum WGENUMFILEFLAGS\r
+{\r
+       WGEFF_NoRecurse         = (1<<0),       // only enumerate files directly in the specified path\r
+       WGEFF_FullPath          = (1<<1),       // enumerated filenames are specified with full path (instead of relative to proj root)\r
+       WGEFF_DirStatusDelta= (1<<2),   // include directories, in enumeration, that have a recursive status != WGFS_Normal\r
+       WGEFF_DirStatusAll      = (1<<3)        // include directories, in enumeration, with recursive status\r
+};\r
+\r
+\r
+// File status\r
+enum WGFILESTATUS\r
+{\r
+       WGFS_Normal,\r
+       WGFS_Modified,\r
+       WGFS_Deleted,\r
+\r
+       WGFS_Unknown = -1\r
+};\r
+\r
+\r
+// File flags\r
+enum WGFILEFLAGS\r
+{\r
+       WGFF_Directory          = (1<<0)        // enumerated file is a directory\r
+};\r
+\r
+\r
+struct wgFile_s\r
+{\r
+       const char *sFileName;                  // filename or directory relative to project root (using forward slashes)\r
+       int nStatus;                                    // the WGFILESTATUS of the file\r
+       int nStage;                                             // the stage number of the file (0 if unstaged)\r
+       int nFlags;                                             // a combination of WGFILEFLAGS\r
+};\r
+\r
+\r
+// Application-defined callback function for wgEnumFiles, returns TRUE to abort enumeration\r
+typedef BOOL (__cdecl WGENUMFILECB)(const struct wgFile_s *pFile, void *pUserData);\r
+\r
+\r
+// Init git framework\r
+BOOL WINGIT_API wgInit(void);\r
+\r
+// Get the lib version\r
+LPCSTR WINGIT_API wgGetVersion(void);\r
+\r
+// Get the git version that is used in this lib\r
+LPCSTR WINGIT_API wgGetGitVersion(void);\r
+\r
+// Enumerate files in a git project\r
+// Ex: wgEnumFiles("C:\\Projects\\MyProject", "src/core", WGEFF_NoRecurse, MyEnumFunc, NULL)\r
+BOOL WINGIT_API wgEnumFiles(const char *pszProjectPath, const char *pszSubPath, unsigned int nFlags, WGENUMFILECB *pEnumCb, void *pUserData);\r
+\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+#endif\r
diff --git a/ext/wingit/wingit.lib b/ext/wingit/wingit.lib
new file mode 100644 (file)
index 0000000..e51b2fa
Binary files /dev/null and b/ext/wingit/wingit.lib differ
index 86a3e59..3aadcaa 100644 (file)
@@ -11,6 +11,11 @@ CGit g_Git;
 CGit::CGit(void)\r
 {\r
        GetCurrentDirectory(MAX_DIRBUFFER,m_CurrentDir.GetBuffer(MAX_DIRBUFFER));\r
+\r
+       if ( !wgInit() )\r
+       {\r
+               // TODO\r
+       }\r
 }\r
 \r
 CGit::~CGit(void)\r
index b92602c..3e9af75 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="gb2312"?>\r
 <VisualStudioProject\r
        ProjectType="Visual C++"\r
-       Version="9.00"\r
+       Version="9,00"\r
        Name="Git"\r
        ProjectGUID="{7CA5B1EB-8CC9-40A6-96D8-83649C1A870B}"\r
        RootNamespace="Git"\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath=".\GitFolderStatus.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\GitRev.h"\r
                                >\r
                        </File>\r
index d050f77..f05763b 100644 (file)
@@ -102,6 +102,26 @@ bool GitAdminDir::HasAdminDir(const CString& path, bool bDir,CString *ProjectTop
                sDirName = path.Left(path.ReverseFind('\\'));\r
        }\r
        \r
+       // a .git dir or anything inside it should be left out, only interested in working copy files -- Myagi\r
+       {\r
+       int n = 0;\r
+       for (;;)\r
+       {\r
+               n = sDirName.Find(_T("\\.git"), n);\r
+               if (n < 0)\r
+               {\r
+                       break;\r
+               }\r
+\r
+               // check for actual .git dir (and not .gitignore or something else), continue search if false match\r
+               n += 5;\r
+               if (sDirName[n] == _T('\\') || sDirName[n] == 0)\r
+               {\r
+                       return false;\r
+               }\r
+       }\r
+       }\r
+\r
        do\r
        {\r
                if(PathFileExists(sDirName + _T("\\.git")))\r
diff --git a/src/Git/GitFolderStatus.cpp b/src/Git/GitFolderStatus.cpp
new file mode 100644 (file)
index 0000000..c73ca54
--- /dev/null
@@ -0,0 +1,505 @@
+// TortoiseSVN - a Windows shell extension for easy version control\r
+\r
+// Copyright (C) 2003-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 "ShellExt.h"\r
+#include "GitFolderStatus.h"\r
+#include "UnicodeUtils.h"\r
+#include "..\TGitCache\CacheInterface.h"\r
+//#include "GitGlobal.h"\r
+\r
+extern ShellCache g_ShellCache;\r
+\r
+\r
+// get / auto-alloc a string "copy"\r
+\r
+const char* StringPool::GetString (const char* value)\r
+{\r
+       // special case: NULL pointer\r
+       \r
+       if (value == NULL)\r
+       {\r
+               return emptyString;\r
+       }\r
+\r
+       // do we already have a string with the desired value?\r
+\r
+       pool_type::const_iterator iter = pool.find (value);\r
+       if (iter != pool.end())\r
+       {\r
+               // yes -> return it\r
+               return *iter;\r
+       }\r
+       \r
+       // no -> add one        \r
+       \r
+       const char* newString =  _strdup (value);\r
+       if (newString)\r
+       {\r
+               pool.insert (newString);\r
+       }\r
+       else\r
+               return emptyString;\r
+       \r
+       // .. and return it\r
+       \r
+       return newString;\r
+}\r
+\r
+// clear internal pool\r
+\r
+void StringPool::clear()\r
+{\r
+       // delete all strings\r
+\r
+       for (pool_type::iterator iter = pool.begin(), end = pool.end(); iter != end; ++iter)\r
+       {\r
+               free((void*)*iter);\r
+       }\r
+               \r
+       // remove pointers from pool\r
+               \r
+       pool.clear();\r
+}\r
+\r
+CTGitPath      GitFolderStatus::folderpath;\r
+\r
+\r
+GitFolderStatus::GitFolderStatus(void)\r
+{\r
+       m_TimeStamp = 0;\r
+       emptyString[0] = 0;\r
+       invalidstatus.author = emptyString;\r
+       invalidstatus.askedcounter = -1;\r
+       invalidstatus.status = git_wc_status_none;\r
+       invalidstatus.url = emptyString;\r
+//     invalidstatus.rev = -1;\r
+       invalidstatus.owner = emptyString;\r
+       invalidstatus.needslock = false;\r
+       invalidstatus.tree_conflict = false;\r
+       m_nCounter = 0;\r
+       dirstatus = NULL;\r
+       sCacheKey.reserve(MAX_PATH);\r
+\r
+       //rootpool = svn_pool_create (NULL);\r
+\r
+       m_hInvalidationEvent = CreateEvent(NULL, FALSE, FALSE, _T("TortoiseGitCacheInvalidationEvent"));\r
+}\r
+\r
+GitFolderStatus::~GitFolderStatus(void)\r
+{\r
+       //svn_pool_destroy(rootpool);\r
+       CloseHandle(m_hInvalidationEvent);\r
+}\r
+\r
+const FileStatusCacheEntry * GitFolderStatus::BuildCache(const CTGitPath& filepath, const CString& sProjectRoot, BOOL bIsFolder, BOOL bDirectFolder)\r
+{\r
+//     svn_client_ctx_t *                      localctx;\r
+//     apr_hash_t *                            statushash;\r
+//     apr_pool_t *                            pool;\r
+       //git_error_t *                         err = NULL; // If svn_client_status comes out through catch(...), err would else be unassigned\r
+       BOOL err = FALSE;\r
+\r
+       //dont' build the cache if an instance of TortoiseProc is running\r
+       //since this could interfere with svn commands running (concurrent\r
+       //access of the .git directory).\r
+       if (g_ShellCache.BlockStatus())\r
+       {\r
+               HANDLE TGitMutex = ::CreateMutex(NULL, FALSE, _T("TortoiseGitProc.exe"));       \r
+               if (TGitMutex != NULL)\r
+               {\r
+                       if (::GetLastError() == ERROR_ALREADY_EXISTS)\r
+                       {\r
+                               ::CloseHandle(TGitMutex);\r
+                               return &invalidstatus;\r
+                       }\r
+               }\r
+               ::CloseHandle(TGitMutex);\r
+       }\r
+\r
+//     pool = svn_pool_create (rootpool);                              // create the memory pool\r
+\r
+       ClearCache();\r
+//     svn_error_clear(svn_client_create_context(&localctx, pool));\r
+       // set up the configuration\r
+       // Note: I know this is an 'expensive' call, but without this, ignores\r
+       // done in the global ignore pattern won't show up.\r
+       if (g_ShellCache.ShowIgnoredOverlay())\r
+;//            svn_error_clear(svn_config_get_config (&(localctx->config), g_pConfigDir, pool));\r
+\r
+       // strings pools are unused, now -> we may clear them\r
+       \r
+       authors.clear();\r
+       urls.clear();\r
+       owners.clear();\r
+       \r
+       ATLTRACE2(_T("building cache for %s\n"), filepath);\r
+       if (bIsFolder)\r
+       {\r
+               if (bDirectFolder)\r
+               {\r
+                       // NOTE: see not in GetFullStatus about project inside another project, we should only get here when\r
+                       //       that occurs, and this is not correctly handled yet\r
+\r
+                       // initialize record members\r
+//                     dirstat.rev = -1;\r
+                       dirstat.status = git_wc_status_none;\r
+                       dirstat.author = authors.GetString(NULL);\r
+                       dirstat.url = urls.GetString(NULL);\r
+                       dirstat.owner = owners.GetString(NULL);\r
+                       dirstat.askedcounter = GITFOLDERSTATUS_CACHETIMES;\r
+                       dirstat.needslock = false;\r
+                       dirstat.tree_conflict = false;\r
+\r
+                       dirstatus = NULL;\r
+//                     statushash = apr_hash_make(pool);\r
+//                     git_revnum_t youngest = GIT_INVALID_REVNUM;\r
+//                     git_opt_revision_t rev;\r
+//                     rev.kind = git_opt_revision_unspecified;\r
+                       try\r
+                       {\r
+                               folderpath = filepath;\r
+\r
+                               /*err = svn_client_status4 (&youngest,\r
+                                       filepath.GetDirectory().GetSVNApiPath(pool),\r
+                                       &rev,\r
+                                       findfolderstatus,\r
+                                       this,\r
+                                       svn_depth_empty,//depth\r
+                                       TRUE,           //getall\r
+                                       FALSE,          //update\r
+                                       TRUE,           //noignore\r
+                                       FALSE,          //ignore externals\r
+                                       NULL,\r
+                                       localctx,\r
+                                       pool);*/\r
+                       }\r
+                       catch ( ... )\r
+                       {\r
+                               dirstatus = NULL;\r
+                       }\r
+\r
+\r
+                       if (dirstatus)\r
+                       {\r
+/*                             if (dirstatus->entry)\r
+                               {\r
+                                       dirstat.author = authors.GetString (dirstatus->entry->cmt_author);\r
+                                       dirstat.url = authors.GetString (dirstatus->entry->url);\r
+                                       dirstat.rev = dirstatus->entry->cmt_rev;\r
+                                       dirstat.owner = owners.GetString(dirstatus->entry->lock_owner);\r
+                               }*/\r
+                               dirstat.status = GitStatus::GetMoreImportant(dirstatus->text_status, dirstatus->prop_status);\r
+//                             dirstat.tree_conflict = dirstatus->tree_conflict != NULL;\r
+                       }\r
+                       m_cache[filepath.GetWinPath()] = dirstat;\r
+                       m_TimeStamp = GetTickCount();\r
+//                     svn_error_clear(err);\r
+//                     svn_pool_destroy (pool);                                //free allocated memory\r
+                       return &dirstat;\r
+               }\r
+       } // if (bIsFolder) \r
+       \r
+       m_nCounter = 0;\r
+       \r
+       //Fill in the cache with\r
+       //all files inside the same folder as the asked file/folder is\r
+       //since subversion can do this in one step\r
+//     localctx->auth_baton = NULL;\r
+\r
+//     statushash = apr_hash_make(pool);\r
+//     git_revnum_t youngest = GIT_INVALID_REVNUM;\r
+//     git_opt_revision_t rev;\r
+//     rev.kind = git_opt_revision_unspecified;\r
+       try\r
+       {\r
+               // extract the sub-path (relative to project root)\r
+//MessageBox(NULL, filepath.GetDirectory().GetWinPathString(), sProjectRoot, MB_OK);\r
+               LPCSTR lpszSubPath = NULL;\r
+               CStringA sSubPath;\r
+               CString s = filepath.GetDirectory().GetWinPathString();\r
+               if (s.GetLength() > sProjectRoot.GetLength())\r
+               {\r
+                       sSubPath = CStringA(s.Right(s.GetLength() - sProjectRoot.GetLength() - 1/*otherwise it gets initial slash*/));\r
+                       lpszSubPath = sSubPath;\r
+               }\r
+\r
+//if (lpszSubPath) MessageBoxA(NULL, lpszSubPath, "BuildCache", MB_OK);\r
+//MessageBoxA(NULL, CStringA(sProjectRoot), sSubPath, MB_OK);\r
+               err = !wgEnumFiles(CStringA(sProjectRoot), lpszSubPath, WGEFF_NoRecurse|WGEFF_FullPath|WGEFF_DirStatusDelta, &fillstatusmap, this);\r
+\r
+               /*err = svn_client_status4 (&youngest,\r
+                       filepath.GetDirectory().GetSVNApiPath(pool),\r
+                       &rev,\r
+                       fillstatusmap,\r
+                       this,\r
+                       svn_depth_immediates,           //depth\r
+                       TRUE,           //getall\r
+                       FALSE,          //update\r
+                       TRUE,           //noignore\r
+                       FALSE,          //ignore externals\r
+                       NULL,\r
+                       localctx,\r
+                       pool);*/\r
+       }\r
+       catch ( ... )\r
+       {\r
+       }\r
+\r
+       // Error present if function is not under version control\r
+       if (err != NULL)\r
+       {\r
+//             svn_error_clear(err);\r
+//             svn_pool_destroy (pool);                                //free allocated memory\r
+               return &invalidstatus;  \r
+       }\r
+\r
+//     svn_error_clear(err);\r
+//     svn_pool_destroy (pool);                                //free allocated memory\r
+       m_TimeStamp = GetTickCount();\r
+       const FileStatusCacheEntry * ret = NULL;\r
+       FileStatusMap::const_iterator iter;\r
+       if ((iter = m_cache.find(filepath.GetWinPath())) != m_cache.end())\r
+       {\r
+               ret = &iter->second;\r
+               m_mostRecentPath = filepath;\r
+               m_mostRecentStatus = ret;\r
+       }\r
+       else\r
+       {\r
+               // for SUBST'ed drives, Subversion doesn't return a path with a backslash\r
+               // e.g. G:\ but only G: when fetching the status. So search for that\r
+               // path too before giving up.\r
+               // This is especially true when right-clicking directly on a SUBST'ed\r
+               // drive to get the context menu\r
+               if (_tcslen(filepath.GetWinPath())==3)\r
+               {\r
+                       if ((iter = m_cache.find((LPCTSTR)filepath.GetWinPathString().Left(2))) != m_cache.end())\r
+                       {\r
+                               ret = &iter->second;\r
+                               m_mostRecentPath = filepath;\r
+                               m_mostRecentStatus = ret;\r
+                       }\r
+               }               \r
+       }\r
+       if (ret)\r
+               return ret;\r
+       return &invalidstatus;\r
+}\r
+\r
+DWORD GitFolderStatus::GetTimeoutValue()\r
+{\r
+       DWORD timeout = GITFOLDERSTATUS_CACHETIMEOUT;\r
+       DWORD factor = m_cache.size()/200;\r
+       if (factor==0)\r
+               factor = 1;\r
+       return factor*timeout;\r
+}\r
+\r
+const FileStatusCacheEntry * GitFolderStatus::GetFullStatus(const CTGitPath& filepath, BOOL bIsFolder, BOOL bColumnProvider)\r
+{\r
+       const FileStatusCacheEntry * ret = NULL;\r
+\r
+       CString sProjectRoot;\r
+       BOOL bHasAdminDir = g_ShellCache.HasSVNAdminDir(filepath.GetWinPath(), bIsFolder, &sProjectRoot);\r
+       \r
+       //no overlay for unversioned folders\r
+       if ((!bColumnProvider)&&(!bHasAdminDir))\r
+               return &invalidstatus;\r
+       //for the SVNStatus column, we have to check the cache to see\r
+       //if it's not just unversioned but ignored\r
+       ret = GetCachedItem(filepath);\r
+       if ((ret)&&(ret->status == git_wc_status_unversioned)&&(bIsFolder)&&(bHasAdminDir))\r
+       {\r
+               // an 'unversioned' folder, but with an ADMIN dir --> nested layout!\r
+               // NOTE: this could be a sub-project in git, or just some standalone project inside of another, either way a TODO\r
+               ret = BuildCache(filepath, sProjectRoot, bIsFolder, TRUE);\r
+               if (ret)\r
+                       return ret;\r
+               else\r
+                       return &invalidstatus;\r
+       }\r
+       if (ret)\r
+               return ret;\r
+\r
+       //if it's not in the cache and has no admin dir, then we assume\r
+       //it's not ignored too\r
+       if ((bColumnProvider)&&(!bHasAdminDir))\r
+               return &invalidstatus;\r
+       ret = BuildCache(filepath, sProjectRoot, bIsFolder);\r
+       if (ret)\r
+               return ret;\r
+       else\r
+               return &invalidstatus;\r
+}\r
+\r
+const FileStatusCacheEntry * GitFolderStatus::GetCachedItem(const CTGitPath& filepath)\r
+{\r
+       sCacheKey.assign(filepath.GetWinPath());\r
+       FileStatusMap::const_iterator iter;\r
+       const FileStatusCacheEntry *retVal;\r
+\r
+       if(m_mostRecentPath.IsEquivalentTo(CTGitPath(sCacheKey.c_str())))\r
+       {\r
+               // We've hit the same result as we were asked for last time\r
+               ATLTRACE2(_T("fast cache hit for %s\n"), filepath);\r
+               retVal = m_mostRecentStatus;\r
+       }\r
+       else if ((iter = m_cache.find(sCacheKey)) != m_cache.end())\r
+       {\r
+               ATLTRACE2(_T("cache found for %s\n"), filepath);\r
+               retVal = &iter->second;\r
+               m_mostRecentStatus = retVal;\r
+               m_mostRecentPath = CTGitPath(sCacheKey.c_str());\r
+       }\r
+       else\r
+       {\r
+               retVal = NULL;\r
+       }\r
+\r
+       if(retVal != NULL)\r
+       {\r
+               // We found something in a cache - check that the cache is not timed-out or force-invalidated\r
+               DWORD now = GetTickCount();\r
+\r
+               if ((now >= m_TimeStamp)&&((now - m_TimeStamp) > GetTimeoutValue()))\r
+               {\r
+                       // Cache is timed-out\r
+                       ATLTRACE("Cache timed-out\n");\r
+                       ClearCache();\r
+                       retVal = NULL;\r
+               }\r
+               else if(WaitForSingleObject(m_hInvalidationEvent, 0) == WAIT_OBJECT_0)\r
+               {\r
+                       // TortoiseProc has just done something which has invalidated the cache\r
+                       ATLTRACE("Cache invalidated\n");\r
+                       ClearCache();\r
+                       retVal = NULL;\r
+               }\r
+               return retVal;\r
+       }\r
+       return NULL;\r
+}\r
+\r
+BOOL GitFolderStatus::fillstatusmap(const struct wgFile_s *pFile, void *pUserData)\r
+{\r
+       GitFolderStatus *Stat = (GitFolderStatus*)pUserData;\r
+\r
+       FileStatusMap &cache = Stat->m_cache;\r
+       FileStatusCacheEntry s;\r
+       s.needslock = false;\r
+       s.tree_conflict = false;\r
+\r
+       s.author = Stat->authors.GetString(NULL);\r
+       s.url = Stat->urls.GetString(NULL);\r
+//     s.rev = -1;\r
+       s.owner = Stat->owners.GetString(NULL);\r
+\r
+       s.status = git_wc_status_none;\r
+\r
+       //s.status = GitStatus::GetMoreImportant(s.status, status->text_status);\r
+       //s.status = GitStatus::GetMoreImportant(s.status, status->prop_status);\r
+       s.status = GitStatusFromWingit(pFile->nStatus);\r
+\r
+       // TODO ?: s.blaha = pFile->nStage\r
+\r
+       //s.lock = status->repos_lock;\r
+       //s.tree_conflict = (status->tree_conflict != NULL);\r
+\r
+       s.askedcounter = GITFOLDERSTATUS_CACHETIMES;\r
+       stdstring str;\r
+       if (pFile->sFileName)\r
+       {\r
+               str = CUnicodeUtils::StdGetUnicode(pFile->sFileName);\r
+               std::replace(str.begin(), str.end(), '/', '\\');\r
+//MessageBox(NULL, str.c_str(), _T(""), MB_OK);\r
+       }\r
+       else\r
+               str = _T(" ");\r
+       cache[str] = s;\r
+\r
+       return FALSE;\r
+}\r
+\r
+#if 0\r
+git_error_t* GitFolderStatus::fillstatusmap(void * baton, const char * path, git_wc_status2_t * status, apr_pool_t * /*pool*/)\r
+{\r
+       GitFolderStatus * Stat = (GitFolderStatus *)baton;\r
+       FileStatusMap * cache = &Stat->m_cache;\r
+       FileStatusCacheEntry s;\r
+       s.needslock = false;\r
+       s.tree_conflict = false;\r
+       if ((status)&&(status->entry))\r
+       {\r
+               s.author = Stat->authors.GetString(status->entry->cmt_author);\r
+               s.url = Stat->urls.GetString(status->entry->url);\r
+               s.rev = status->entry->cmt_rev;\r
+               s.owner = Stat->owners.GetString(status->entry->lock_owner);\r
+               if (status->entry->present_props)\r
+                       s.needslock = strstr(status->entry->present_props, "svn:needs-lock") ? true : false;\r
+       }\r
+       else\r
+       {\r
+               s.author = Stat->authors.GetString(NULL);\r
+               s.url = Stat->urls.GetString(NULL);\r
+               s.rev = -1;\r
+               s.owner = Stat->owners.GetString(NULL);\r
+       }\r
+       s.status = git_wc_status_none;\r
+       if (status)\r
+       {\r
+               s.status = GitStatus::GetMoreImportant(s.status, status->text_status);\r
+               s.status = GitStatus::GetMoreImportant(s.status, status->prop_status);\r
+               s.lock = status->repos_lock;\r
+               s.tree_conflict = (status->tree_conflict != NULL);\r
+       }\r
+       s.askedcounter = GITFOLDERSTATUS_CACHETIMES;\r
+       stdstring str;\r
+       if (path)\r
+       {\r
+               str = CUnicodeUtils::StdGetUnicode(path);\r
+               std::replace(str.begin(), str.end(), '/', '\\');\r
+       }\r
+       else\r
+               str = _T(" ");\r
+       (*cache)[str] = s;\r
+\r
+       return GIT_NO_ERROR;\r
+}\r
+\r
+git_error_t* GitFolderStatus::findfolderstatus(void * baton, const char * path, git_wc_status2_t * status, apr_pool_t * /*pool*/)\r
+{\r
+       GitFolderStatus * Stat = (GitFolderStatus *)baton;\r
+       if ((Stat)&&(Stat->folderpath.IsEquivalentTo(CTGitPath(CString(path)))))\r
+       {\r
+               Stat->dirstatus = status;\r
+       }\r
+\r
+       return GIT_NO_ERROR;\r
+}\r
+#endif\r
+\r
+void GitFolderStatus::ClearCache()\r
+{\r
+       m_cache.clear();\r
+       m_mostRecentStatus = NULL;\r
+       m_mostRecentPath.Reset();\r
+       // If we're about to rebuild the cache, there's no point hanging on to \r
+       // an event which tells us that it's invalid\r
+       ResetEvent(m_hInvalidationEvent);\r
+}\r
diff --git a/src/Git/GitFolderStatus.h b/src/Git/GitFolderStatus.h
new file mode 100644 (file)
index 0000000..222a5f3
--- /dev/null
@@ -0,0 +1,149 @@
+// TortoiseSVN - a Windows shell extension for easy version control\r
+\r
+// Copyright (C) 2003-2006,2008 - Stefan Kueng\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
+\r
+#include "GitStatus.h"\r
+#include "TGitPath.h"\r
+\r
+/**\r
+ * \ingroup TortoiseShell\r
+ * a simple utility class:\r
+ * stores unique copies of given string values,\r
+ * i.e. for a given value, always the same const char*\r
+ * will be returned.\r
+ * \r
+ * The strings returned are owned by the pool!\r
+ */\r
+class StringPool\r
+{\r
+public:\r
+\r
+       StringPool() {emptyString[0] = 0;}\r
+       ~StringPool() {clear();}\r
+       \r
+       /**\r
+        * Return a string equal to value from the internal pool.\r
+        * If no such string is available, a new one is allocated.\r
+        * NULL is valid for value.\r
+        */\r
+       const char* GetString (const char* value);\r
+       \r
+       /**\r
+        * invalidates all strings returned by GetString()\r
+        * frees all internal data\r
+        */\r
+       void clear();\r
+       \r
+private:\r
+\r
+       // comparator: compare C-style strings\r
+       \r
+       struct LessString\r
+       {\r
+               bool operator()(const char* lhs, const char* rhs) const\r
+               {\r
+                       return strcmp (lhs, rhs) < 0;\r
+               }\r
+       };\r
+       \r
+       // store the strings in a map\r
+       // caution: modifying the map must not modify the string pointers\r
+       \r
+       typedef std::set<const char*, LessString> pool_type;\r
+       pool_type pool;\r
+       char emptyString[1];\r
+};\r
+\r
+\r
+typedef struct FileStatusCacheEntry\r
+{\r
+       git_wc_status_kind              status;\r
+       const char*                             author;         ///< points to a (possibly) shared value\r
+       const char*                             url;            ///< points to a (possibly) shared value\r
+       const char*                             owner;          ///< points to a (possible) lock owner\r
+       bool                                    needslock;\r
+       //git_revnum_t                  rev;\r
+       int                                             askedcounter;\r
+       //git_lock_t *                  lock;\r
+       bool                                    tree_conflict;\r
+} FileStatusCacheEntry;\r
+\r
+#define GITFOLDERSTATUS_CACHETIMES                             10\r
+#define GITFOLDERSTATUS_CACHETIMEOUT                   2000\r
+#define GITFOLDERSTATUS_RECURSIVECACHETIMEOUT  4000\r
+#define GITFOLDERSTATUS_FOLDER                                 500\r
+/**\r
+ * \ingroup TortoiseShell\r
+ * This class represents a caching mechanism for the\r
+ * subversion statuses. Once a status for a versioned\r
+ * file is requested (GetFileStatus()) first its checked\r
+ * if that status is already in the cache. If it is not\r
+ * then the subversion statuses for ALL files in the same\r
+ * directory is fetched and cached. This is because subversion\r
+ * needs almost the same time to get one or all status (in\r
+ * the same directory).\r
+ * To prevent a cache flush for the explorer folder view\r
+ * the cache is only fetched for versioned files and\r
+ * not for folders.\r
+ */\r
+class GitFolderStatus\r
+{\r
+public:\r
+       GitFolderStatus(void);\r
+       ~GitFolderStatus(void);\r
+       const FileStatusCacheEntry *    GetFullStatus(const CTGitPath& filepath, BOOL bIsFolder, BOOL bColumnProvider = FALSE);\r
+       const FileStatusCacheEntry *    GetCachedItem(const CTGitPath& filepath);\r
+\r
+       FileStatusCacheEntry            invalidstatus;\r
+\r
+private:\r
+       const FileStatusCacheEntry * BuildCache(const CTGitPath& filepath, const CString& sProjectRoot, BOOL bIsFolder, BOOL bDirectFolder = FALSE);\r
+       DWORD                           GetTimeoutValue();\r
+       //static git_error_t*   fillstatusmap (void *baton, const char *path, git_wc_status2_t *status, apr_pool_t *pool);\r
+       //static git_error_t*   findfolderstatus (void *baton, const char *path, git_wc_status2_t *status, apr_pool_t *pool);\r
+       static BOOL                     fillstatusmap(const struct wgFile_s *pFile, void *pUserData);\r
+       static CTGitPath        folderpath;\r
+       void                            ClearCache();\r
+       \r
+       int                                     m_nCounter;\r
+       typedef std::map<stdstring, FileStatusCacheEntry> FileStatusMap;\r
+       FileStatusMap                   m_cache;\r
+       DWORD                                   m_TimeStamp;\r
+       FileStatusCacheEntry    dirstat;\r
+       FileStatusCacheEntry    filestat;\r
+       git_wc_status2_t *              dirstatus;\r
+       //apr_pool_t *                  rootpool;\r
+\r
+       // merging these pools won't save memory\r
+       // but access will become slower\r
+       \r
+       StringPool              authors;       \r
+       StringPool              urls;\r
+       StringPool              owners;\r
+       char                    emptyString[1];\r
+\r
+       stdstring               sCacheKey;\r
+\r
+       HANDLE                  m_hInvalidationEvent;\r
+\r
+       // The item we most recently supplied status for \r
+       CTGitPath               m_mostRecentPath;\r
+       const FileStatusCacheEntry* m_mostRecentStatus;\r
+};\r
+\r
index 8e7ae07..0d47c48 100644 (file)
@@ -33,6 +33,7 @@
 //#    include "PathUtils.h"\r
 #endif\r
 \r
+\r
 GitStatus::GitStatus(bool * pbCanceled)\r
        : status(NULL)\r
 {\r
@@ -189,27 +190,48 @@ stdstring GitStatus::GetLastErrorMsg() const
 // static method\r
 git_wc_status_kind GitStatus::GetAllStatus(const CTGitPath& path, git_depth_t depth)\r
 {\r
-       git_wc_status_kind                      statuskind = git_wc_status_none;\r
-#if 0\r
-       git_client_ctx_t *                      ctx;\r
+       git_wc_status_kind                      statuskind;\r
+//     git_client_ctx_t *                      ctx;\r
        \r
-       apr_pool_t *                            pool;\r
-       git_error_t *                           err;\r
+//     apr_pool_t *                            pool;\r
+//     git_error_t *                           err;\r
+       BOOL                                            err;\r
        BOOL                                            isDir;\r
+       CString                                         sProjectRoot;\r
 \r
        isDir = path.IsDirectory();\r
-       if (!path.HasAdminDir())\r
+       if (!path.HasAdminDir(&sProjectRoot))\r
                return git_wc_status_none;\r
 \r
-       pool = git_pool_create (NULL);                          // create the memory pool\r
+//     pool = git_pool_create (NULL);                          // create the memory pool\r
 \r
-       git_error_clear(git_client_create_context(&ctx, pool));\r
+//     git_error_clear(git_client_create_context(&ctx, pool));\r
 \r
-       git_revnum_t youngest = Git_INVALID_REVNUM;\r
-       git_opt_revision_t rev;\r
-       rev.kind = git_opt_revision_unspecified;\r
-       err = git_client_status4 (&youngest,\r
-                                                       path.GetGitApiPath(pool),\r
+//     git_revnum_t youngest = Git_INVALID_REVNUM;\r
+//     git_opt_revision_t rev;\r
+//     rev.kind = git_opt_revision_unspecified;\r
+       statuskind = git_wc_status_none;\r
+\r
+       // TODO: not sure what to do with recursivenes, it's very unclear exactly what svn does, wingit will however return\r
+       //       the correct (recursive) status for folders, so WGEFF_NoRecurse can be specified to avoid unecessary processing\r
+       //const BOOL bIsRecursive = (depth == git_depth_infinity || depth == git_depth_unknown); // taken from SVN source\r
+       UINT nFlags = WGEFF_DirStatusAll;\r
+       //if (!bIsRecursive)\r
+               nFlags |= WGEFF_NoRecurse;\r
+\r
+       LPCSTR lpszSubPath = NULL;\r
+       CStringA sSubPath;\r
+       CString s = path.GetDirectory().GetWinPathString();\r
+       if (s.GetLength() > sProjectRoot.GetLength())\r
+       {\r
+               sSubPath = CStringA(s.Right(s.GetLength() - sProjectRoot.GetLength() - 1/*otherwise it gets initial slash*/));\r
+               lpszSubPath = sSubPath;\r
+       }\r
+\r
+       err = !wgEnumFiles(CStringA(sProjectRoot), lpszSubPath, nFlags, &getallstatus, &statuskind);\r
+\r
+       /*err = git_client_status4 (&youngest,\r
+                                                       path.GetSVNApiPath(pool),\r
                                                        &rev,\r
                                                        getallstatus,\r
                                                        &statuskind,\r
@@ -220,18 +242,18 @@ git_wc_status_kind GitStatus::GetAllStatus(const CTGitPath& path, git_depth_t de
                                                        FALSE,          //ignore externals\r
                                                        NULL,\r
                                                        ctx,\r
-                                                       pool);\r
+                                                       pool);*/\r
 \r
        // Error present\r
        if (err != NULL)\r
        {\r
-               git_error_clear(err);\r
-               git_pool_destroy (pool);                                //free allocated memory\r
+//             git_error_clear(err);\r
+//             git_pool_destroy (pool);                                //free allocated memory\r
                return git_wc_status_none;      \r
        }\r
 \r
-       git_pool_destroy (pool);                                //free allocated memory\r
-#endif\r
+//     git_pool_destroy (pool);                                //free allocated memory\r
+\r
        return statuskind;\r
 }\r
 \r
@@ -338,8 +360,34 @@ git_revnum_t GitStatus::GetStatus(const CTGitPath& path, bool update /* = false
 #endif\r
        return CString("");\r
 }\r
+\r
 git_wc_status2_t * GitStatus::GetFirstFileStatus(const CTGitPath& path, CTGitPath& retPath, bool update, git_depth_t depth, bool bNoIgnore /* = true */, bool bNoExternals /* = false */)\r
 {\r
+       static git_wc_status2 st;\r
+/*\r
+       m_fileCache.Reset();\r
+\r
+       m_fileCache.Init( CStringA( path.GetWinPathString().GetString() ) );\r
+MessageBox(NULL, path.GetWinPathString(), _T("GetFirstFile"), MB_OK);\r
+       m_fileCache.m_pFileIter = m_fileCache.m_pFiles;\r
+       st.text_status = git_wc_status_none;\r
+\r
+       if (m_fileCache.m_pFileIter)\r
+       {\r
+               switch(m_fileCache.m_pFileIter->nStatus)\r
+               {\r
+               case WGFS_Normal: st.text_status = git_wc_status_normal; break;\r
+               case WGFS_Modified: st.text_status = git_wc_status_modified; break;\r
+               case WGFS_Deleted: st.text_status = git_wc_status_deleted; break;\r
+               }\r
+\r
+               //retPath.SetFromGit((const char*)item->key);\r
+\r
+               m_fileCache.m_pFileIter = m_fileCache.m_pFileIter->pNext;\r
+       }\r
+\r
+       return &st;\r
+*/\r
 #if 0\r
        const sort_item*                        item;\r
 \r
@@ -392,6 +440,7 @@ git_wc_status2_t * GitStatus::GetFirstFileStatus(const CTGitPath& path, CTGitPat
 \r
 unsigned int GitStatus::GetVersionedCount() const\r
 {\r
+//     return /**/m_fileCache.GetFileCount();\r
 \r
        unsigned int count = 0;\r
 #if 0\r
@@ -411,6 +460,24 @@ unsigned int GitStatus::GetVersionedCount() const
 \r
 git_wc_status2_t * GitStatus::GetNextFileStatus(CTGitPath& retPath)\r
 {\r
+       static git_wc_status2 st;\r
+\r
+       st.text_status = git_wc_status_none;\r
+\r
+       /*if (m_fileCache.m_pFileIter)\r
+       {\r
+               switch(m_fileCache.m_pFileIter->nStatus)\r
+               {\r
+               case WGFS_Normal: st.text_status = git_wc_status_normal; break;\r
+               case WGFS_Modified: st.text_status = git_wc_status_modified; break;\r
+               case WGFS_Deleted: st.text_status = git_wc_status_deleted; break;\r
+               }\r
+\r
+               m_fileCache.m_pFileIter = m_fileCache.m_pFileIter->pNext;\r
+       }*/\r
+\r
+       return &st;\r
+\r
 #if 0\r
        const sort_item*                        item;\r
 \r
@@ -669,6 +736,13 @@ int GitStatus::LoadStringEx(HINSTANCE hInstance, UINT uID, LPTSTR lpBuffer, int
        return ret;\r
 }\r
 \r
+BOOL GitStatus::getallstatus(const struct wgFile_s *pFile, void *pUserData)\r
+{\r
+       git_wc_status_kind * s = (git_wc_status_kind *)pUserData;\r
+       *s = GitStatus::GetMoreImportant(*s, GitStatusFromWingit(pFile->nStatus));\r
+       return FALSE;\r
+}\r
+\r
 #if 0\r
 git_error_t * GitStatus::getallstatus(void * baton, const char * /*path*/, git_wc_status2_t * status, apr_pool_t * /*pool*/)\r
 {\r
index 1ba4e16..d04d80a 100644 (file)
@@ -15,6 +15,7 @@ typedef std::basic_string<wchar_t> wide_string;
 #pragma warning (pop)\r
 \r
 #include "TGitPath.h"\r
+#include "wingit.h"\r
 \r
 typedef enum type_git_wc_status_kind\r
 {\r
@@ -60,6 +61,21 @@ typedef struct git_wc_status2_t
 \r
 #define MAX_STATUS_STRING_LENGTH               256\r
 \r
+\r
+// convert wingit.dll status to git_wc_status_kind\r
+inline static git_wc_status_kind GitStatusFromWingit(int nStatus)\r
+{\r
+       switch (nStatus)\r
+       {\r
+       case WGFS_Normal: return git_wc_status_normal;\r
+       case WGFS_Modified: return git_wc_status_modified;\r
+       case WGFS_Deleted: return git_wc_status_deleted;\r
+       }\r
+\r
+       return git_wc_status_none;\r
+}\r
+\r
+\r
 /**\r
  * \ingroup Git\r
  * Handles Subversion status of working copies.\r
@@ -232,7 +248,8 @@ private:
        /**\r
         * Callback function which collects the raw status from a Git_client_status() function call\r
         */\r
-//     static git_error_t * getallstatus (void *baton, const char *path, git_wc_status2_t *status, apr_pool_t *pool);\r
+       //static git_error_t * getallstatus (void *baton, const char *path, git_wc_status2_t *status, apr_pool_t *pool);\r
+       static BOOL getallstatus(const struct wgFile_s *pFile, void *pUserData);\r
 \r
        /**\r
         * Callback function which stores the raw status from a Git_client_status() function call\r
index af6a4ab..759d811 100644 (file)
@@ -729,11 +729,28 @@ bool CTGitPath::HasAdminDir() const
                return m_bHasAdminDir;\r
 \r
        EnsureBackslashPathSet();\r
-       m_bHasAdminDir = g_GitAdminDir.HasAdminDir(m_sBackslashPath, IsDirectory());\r
+       m_bHasAdminDir = g_GitAdminDir.HasAdminDir(m_sBackslashPath, IsDirectory(), &m_sProjectRoot);\r
        m_bHasAdminDirKnown = true;\r
        return m_bHasAdminDir;\r
 }\r
 \r
+bool CTGitPath::HasAdminDir(CString *ProjectTopDir) const\r
+{\r
+       if (m_bHasAdminDirKnown)\r
+       {\r
+               if (ProjectTopDir)\r
+                       *ProjectTopDir = m_sProjectRoot;\r
+               return m_bHasAdminDir;\r
+       }\r
+\r
+       EnsureBackslashPathSet();\r
+       m_bHasAdminDir = g_GitAdminDir.HasAdminDir(m_sBackslashPath, IsDirectory(), &m_sProjectRoot);\r
+       m_bHasAdminDirKnown = true;\r
+       if (ProjectTopDir)\r
+               *ProjectTopDir = m_sProjectRoot;\r
+       return m_bHasAdminDir;\r
+}\r
+\r
 bool CTGitPath::IsAdminDir() const\r
 {\r
        if (m_bIsAdminDirKnown)\r
index d6b8964..f6ea8b4 100644 (file)
@@ -193,6 +193,7 @@ public:
         * contains an admin directory.\r
         */\r
        bool HasAdminDir() const;\r
+       bool HasAdminDir(CString *ProjectTopDir) const;\r
        \r
        /**\r
         * Checks if the path point to or below a Subversion admin directory (.Git).\r
@@ -252,11 +253,7 @@ private:
        mutable CString m_sUIPath;\r
        mutable CStringA m_sUTF8FwdslashPath;\r
        mutable CStringA m_sUTF8FwdslashPathEscaped;\r
-\r
-       //used for rename case\r
-       mutable CString m_sOldBackslashPath;\r
-       mutable CString m_sOldFwdslashPath;\r
-       \r
+       mutable CString m_sProjectRoot;\r
        // Have we yet determined if this is a directory or not?\r
        mutable bool m_bDirectoryKnown;\r
        mutable bool m_bIsDirectory;\r
index 2b9e3d9..65392cb 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="Windows-1252"?>\r
 <VisualStudioProject\r
        ProjectType="Visual C++"\r
-       Version="9.00"\r
+       Version="9,00"\r
        Name="TGitCache"\r
        ProjectGUID="{A00D2EDC-B4F5-4B41-94BA-13961DE5D296}"\r
        RootNamespace="TSVNCache"\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="Debug|x64"\r
-                       OutputDirectory="..\..\Bin\Debug64\Bin"\r
-                       IntermediateDirectory="..\..\obj\TSVNCache\Debug64"\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="..\..\bin\$(ConfigurationName)\bin"\r
+                       IntermediateDirectory="..\..\obj\TSVNCache\$(ConfigurationName)\"\r
                        ConfigurationType="1"\r
                        UseOfATL="1"\r
                        CharacterSet="1"\r
+                       WholeProgramOptimization="1"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
+                               InlineFunctionExpansion="2"\r
                                AdditionalIncludeDirectories="&quot;../../ext/apr-util/include&quot;;&quot;../../ext/apr-util/xml/expat/lib&quot;;../../ext/Subversion/subversion/include;../../ext/apr/include;../Utils;..\TortoiseShell;..\Git;..\..\ext\gettext\include"\r
-                               PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;UNICODE;_UNICODE"\r
-                               MinimalRebuild="true"\r
-                               BasicRuntimeChecks="3"\r
-                               SmallerTypeCheck="true"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;UNICODE;_UNICODE"\r
                                RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
                                TreatWChar_tAsBuiltInType="true"\r
                                ForceConformanceInForLoopScope="true"\r
                                UsePrecompiledHeader="2"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               IgnoreImportLibrary="true"\r
-                               AdditionalDependencies="Crypt32.lib"\r
-                               OutputFile="$(OutDir)/TSVNCache.exe"\r
-                               LinkIncremental="2"\r
-                               IgnoreDefaultLibraryNames="LIBC"\r
+                               AdditionalDependencies="Crypt32.lib wingit.lib"\r
+                               OutputFile="$(OutDir)/TGitCache.exe"\r
+                               LinkIncremental="1"\r
+                               AdditionalLibraryDirectories="../../ext"\r
                                GenerateDebugInformation="true"\r
-                               ProgramDatabaseFile="$(OutDir)/TSVNCache.pdb"\r
                                SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               OptimizeForWindows98="0"\r
                                RandomizedBaseAddress="1"\r
                                DataExecutionPrevention="0"\r
-                               TargetMachine="17"\r
+                               TargetMachine="1"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="Release|Win32"\r
-                       OutputDirectory="..\..\bin\$(ConfigurationName)\bin"\r
-                       IntermediateDirectory="..\..\obj\TSVNCache\$(ConfigurationName)\"\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="..\..\Bin\Debug64\Bin"\r
+                       IntermediateDirectory="..\..\obj\TSVNCache\Debug64"\r
                        ConfigurationType="1"\r
                        UseOfATL="1"\r
                        CharacterSet="1"\r
-                       WholeProgramOptimization="1"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               InlineFunctionExpansion="2"\r
+                               Optimization="0"\r
                                AdditionalIncludeDirectories="&quot;../../ext/apr-util/include&quot;;&quot;../../ext/apr-util/xml/expat/lib&quot;;../../ext/Subversion/subversion/include;../../ext/apr/include;../Utils;..\TortoiseShell;..\Git;..\..\ext\gettext\include"\r
-                               PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;UNICODE;_UNICODE"\r
+                               PreprocessorDefinitions="WIN64;_DEBUG;_CONSOLE;UNICODE;_UNICODE"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               SmallerTypeCheck="true"\r
                                RuntimeLibrary="2"\r
-                               EnableFunctionLevelLinking="true"\r
                                TreatWChar_tAsBuiltInType="true"\r
                                ForceConformanceInForLoopScope="true"\r
                                UsePrecompiledHeader="2"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
+                               IgnoreImportLibrary="true"\r
                                AdditionalDependencies="Crypt32.lib"\r
-                               OutputFile="$(OutDir)/TGitCache.exe"\r
-                               LinkIncremental="1"\r
+                               OutputFile="$(OutDir)/TSVNCache.exe"\r
+                               LinkIncremental="2"\r
+                               IgnoreDefaultLibraryNames="LIBC"\r
                                GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="$(OutDir)/TSVNCache.pdb"\r
                                SubSystem="2"\r
-                               OptimizeReferences="2"\r
-                               EnableCOMDATFolding="2"\r
-                               OptimizeForWindows98="0"\r
                                RandomizedBaseAddress="1"\r
                                DataExecutionPrevention="0"\r
-                               TargetMachine="1"\r
+                               TargetMachine="17"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                                        />\r
                                </FileConfiguration>\r
                                <FileConfiguration\r
-                                       Name="Debug|x64"\r
+                                       Name="Release|Win32"\r
                                        >\r
                                        <Tool\r
                                                Name="VCCLCompilerTool"\r
                                        />\r
                                </FileConfiguration>\r
                                <FileConfiguration\r
-                                       Name="Release|Win32"\r
+                                       Name="Debug|x64"\r
                                        >\r
                                        <Tool\r
                                                Name="VCCLCompilerTool"\r
index 5412299..b5315fb 100644 (file)
@@ -80,7 +80,6 @@ Global
                {7CA5B1EB-8CC9-40A6-96D8-83649C1A870B}.debug_static|x64.Build.0 = Debug|x64\r
                {7CA5B1EB-8CC9-40A6-96D8-83649C1A870B}.debug_static|x86.ActiveCfg = Debug|Win32\r
                {7CA5B1EB-8CC9-40A6-96D8-83649C1A870B}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
-               {7CA5B1EB-8CC9-40A6-96D8-83649C1A870B}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
                {7CA5B1EB-8CC9-40A6-96D8-83649C1A870B}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {7CA5B1EB-8CC9-40A6-96D8-83649C1A870B}.Debug|Win32.Build.0 = Debug|Win32\r
                {7CA5B1EB-8CC9-40A6-96D8-83649C1A870B}.Debug|x64.ActiveCfg = Debug|x64\r
@@ -108,7 +107,6 @@ Global
                {50797F06-39C5-4802-8E2B-7B7A4EF03214}.debug_static|x64.Build.0 = Debug|x64\r
                {50797F06-39C5-4802-8E2B-7B7A4EF03214}.debug_static|x86.ActiveCfg = Debug|Win32\r
                {50797F06-39C5-4802-8E2B-7B7A4EF03214}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
-               {50797F06-39C5-4802-8E2B-7B7A4EF03214}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
                {50797F06-39C5-4802-8E2B-7B7A4EF03214}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {50797F06-39C5-4802-8E2B-7B7A4EF03214}.Debug|Win32.Build.0 = Debug|Win32\r
                {50797F06-39C5-4802-8E2B-7B7A4EF03214}.Debug|x64.ActiveCfg = Debug|x64\r
@@ -136,7 +134,6 @@ Global
                {BC5A5F3B-E41A-4C56-B16F-263D2C6D6475}.debug_static|x64.Build.0 = Debug|x64\r
                {BC5A5F3B-E41A-4C56-B16F-263D2C6D6475}.debug_static|x86.ActiveCfg = Debug|Win32\r
                {BC5A5F3B-E41A-4C56-B16F-263D2C6D6475}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
-               {BC5A5F3B-E41A-4C56-B16F-263D2C6D6475}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
                {BC5A5F3B-E41A-4C56-B16F-263D2C6D6475}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {BC5A5F3B-E41A-4C56-B16F-263D2C6D6475}.Debug|Win32.Build.0 = Debug|Win32\r
                {BC5A5F3B-E41A-4C56-B16F-263D2C6D6475}.Debug|x64.ActiveCfg = Debug|x64\r
@@ -164,7 +161,6 @@ Global
                {E873DD32-5A31-4DE1-8341-A56A2A5489EA}.debug_static|x64.Build.0 = Debug|x64\r
                {E873DD32-5A31-4DE1-8341-A56A2A5489EA}.debug_static|x86.ActiveCfg = Debug|Win32\r
                {E873DD32-5A31-4DE1-8341-A56A2A5489EA}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
-               {E873DD32-5A31-4DE1-8341-A56A2A5489EA}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
                {E873DD32-5A31-4DE1-8341-A56A2A5489EA}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {E873DD32-5A31-4DE1-8341-A56A2A5489EA}.Debug|Win32.Build.0 = Debug|Win32\r
                {E873DD32-5A31-4DE1-8341-A56A2A5489EA}.Debug|x64.ActiveCfg = Debug|x64\r
@@ -192,7 +188,6 @@ Global
                {A2C38606-3D96-4A2C-B5C5-22CEAC523B37}.debug_static|x64.Build.0 = Debug|x64\r
                {A2C38606-3D96-4A2C-B5C5-22CEAC523B37}.debug_static|x86.ActiveCfg = Debug|Win32\r
                {A2C38606-3D96-4A2C-B5C5-22CEAC523B37}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
-               {A2C38606-3D96-4A2C-B5C5-22CEAC523B37}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
                {A2C38606-3D96-4A2C-B5C5-22CEAC523B37}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {A2C38606-3D96-4A2C-B5C5-22CEAC523B37}.Debug|Win32.Build.0 = Debug|Win32\r
                {A2C38606-3D96-4A2C-B5C5-22CEAC523B37}.Debug|x64.ActiveCfg = Debug|x64\r
@@ -220,7 +215,6 @@ Global
                {12E5B4AE-D7EF-4A57-A22D-6F9F9D8CE1FB}.debug_static|x64.Build.0 = Debug|x64\r
                {12E5B4AE-D7EF-4A57-A22D-6F9F9D8CE1FB}.debug_static|x86.ActiveCfg = Debug|Win32\r
                {12E5B4AE-D7EF-4A57-A22D-6F9F9D8CE1FB}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
-               {12E5B4AE-D7EF-4A57-A22D-6F9F9D8CE1FB}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
                {12E5B4AE-D7EF-4A57-A22D-6F9F9D8CE1FB}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {12E5B4AE-D7EF-4A57-A22D-6F9F9D8CE1FB}.Debug|Win32.Build.0 = Debug|Win32\r
                {12E5B4AE-D7EF-4A57-A22D-6F9F9D8CE1FB}.Debug|x64.ActiveCfg = Debug|x64\r
@@ -248,7 +242,6 @@ Global
                {4BE529FB-C2F2-49F7-A897-054B955564CF}.debug_static|x64.Build.0 = Debug|x64\r
                {4BE529FB-C2F2-49F7-A897-054B955564CF}.debug_static|x86.ActiveCfg = Debug|Win32\r
                {4BE529FB-C2F2-49F7-A897-054B955564CF}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
-               {4BE529FB-C2F2-49F7-A897-054B955564CF}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
                {4BE529FB-C2F2-49F7-A897-054B955564CF}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {4BE529FB-C2F2-49F7-A897-054B955564CF}.Debug|Win32.Build.0 = Debug|Win32\r
                {4BE529FB-C2F2-49F7-A897-054B955564CF}.Debug|x64.ActiveCfg = Debug|x64\r
@@ -276,7 +269,6 @@ Global
                {A5498556-CE09-4095-8335-08FC8370552D}.debug_static|x64.Build.0 = Debug|x64\r
                {A5498556-CE09-4095-8335-08FC8370552D}.debug_static|x86.ActiveCfg = Debug|Win32\r
                {A5498556-CE09-4095-8335-08FC8370552D}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
-               {A5498556-CE09-4095-8335-08FC8370552D}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
                {A5498556-CE09-4095-8335-08FC8370552D}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {A5498556-CE09-4095-8335-08FC8370552D}.Debug|Win32.Build.0 = Debug|Win32\r
                {A5498556-CE09-4095-8335-08FC8370552D}.Debug|x64.ActiveCfg = Debug|x64\r
@@ -318,7 +310,6 @@ Global
                {150172A5-8D02-4C00-ABB5-BD99D4B16B4C}.release_static|x86.ActiveCfg = Release|x86\r
                {150172A5-8D02-4C00-ABB5-BD99D4B16B4C}.release_static|x86.Build.0 = Release|x86\r
                {150172A5-8D02-4C00-ABB5-BD99D4B16B4C}.Release|Mixed Platforms.ActiveCfg = Release|x86\r
-               {150172A5-8D02-4C00-ABB5-BD99D4B16B4C}.Release|Mixed Platforms.Build.0 = Release|x86\r
                {150172A5-8D02-4C00-ABB5-BD99D4B16B4C}.Release|Win32.ActiveCfg = Release|x86\r
                {150172A5-8D02-4C00-ABB5-BD99D4B16B4C}.Release|x64.ActiveCfg = Release|x64\r
                {150172A5-8D02-4C00-ABB5-BD99D4B16B4C}.Release|x86.ActiveCfg = Release|x86\r
@@ -359,7 +350,6 @@ Global
                {13BC1836-2726-45C4-9249-5BA2BBBF8328}.debug_static|x64.Build.0 = Release|x64\r
                {13BC1836-2726-45C4-9249-5BA2BBBF8328}.debug_static|x86.ActiveCfg = Release|Win32\r
                {13BC1836-2726-45C4-9249-5BA2BBBF8328}.Debug|Mixed Platforms.ActiveCfg = Release|Win32\r
-               {13BC1836-2726-45C4-9249-5BA2BBBF8328}.Debug|Mixed Platforms.Build.0 = Release|Win32\r
                {13BC1836-2726-45C4-9249-5BA2BBBF8328}.Debug|Win32.ActiveCfg = Release|Win32\r
                {13BC1836-2726-45C4-9249-5BA2BBBF8328}.Debug|Win32.Build.0 = Release|Win32\r
                {13BC1836-2726-45C4-9249-5BA2BBBF8328}.Debug|x64.ActiveCfg = Release|x64\r
@@ -387,7 +377,6 @@ Global
                {4424F9D2-12EE-49A7-941E-45767900BEA3}.debug_static|x64.Build.0 = Debug|x64\r
                {4424F9D2-12EE-49A7-941E-45767900BEA3}.debug_static|x86.ActiveCfg = Debug|Win32\r
                {4424F9D2-12EE-49A7-941E-45767900BEA3}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
-               {4424F9D2-12EE-49A7-941E-45767900BEA3}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
                {4424F9D2-12EE-49A7-941E-45767900BEA3}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {4424F9D2-12EE-49A7-941E-45767900BEA3}.Debug|Win32.Build.0 = Debug|Win32\r
                {4424F9D2-12EE-49A7-941E-45767900BEA3}.Debug|x64.ActiveCfg = Debug|x64\r
@@ -415,7 +404,6 @@ Global
                {D3AFBFBE-5501-4077-B3B4-3D28BBCA8F20}.debug_static|x64.Build.0 = Debug|x64\r
                {D3AFBFBE-5501-4077-B3B4-3D28BBCA8F20}.debug_static|x86.ActiveCfg = Debug|Win32\r
                {D3AFBFBE-5501-4077-B3B4-3D28BBCA8F20}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
-               {D3AFBFBE-5501-4077-B3B4-3D28BBCA8F20}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
                {D3AFBFBE-5501-4077-B3B4-3D28BBCA8F20}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {D3AFBFBE-5501-4077-B3B4-3D28BBCA8F20}.Debug|Win32.Build.0 = Debug|Win32\r
                {D3AFBFBE-5501-4077-B3B4-3D28BBCA8F20}.Debug|x64.ActiveCfg = Debug|x64\r
@@ -443,7 +431,6 @@ Global
                {454D5FCC-E25A-4B45-9CA2-01ABB0FA5181}.debug_static|x64.Build.0 = Release|x64\r
                {454D5FCC-E25A-4B45-9CA2-01ABB0FA5181}.debug_static|x86.ActiveCfg = Release|Win32\r
                {454D5FCC-E25A-4B45-9CA2-01ABB0FA5181}.Debug|Mixed Platforms.ActiveCfg = Release|Win32\r
-               {454D5FCC-E25A-4B45-9CA2-01ABB0FA5181}.Debug|Mixed Platforms.Build.0 = Release|Win32\r
                {454D5FCC-E25A-4B45-9CA2-01ABB0FA5181}.Debug|Win32.ActiveCfg = Release|Win32\r
                {454D5FCC-E25A-4B45-9CA2-01ABB0FA5181}.Debug|Win32.Build.0 = Release|Win32\r
                {454D5FCC-E25A-4B45-9CA2-01ABB0FA5181}.Debug|x64.ActiveCfg = Release|x64\r
index e4dce1f..28d5d6a 100644 (file)
@@ -3,11 +3,12 @@
                <Feature Id="DefaultFeature" Level="1" ConfigurableDirectory="INSTALLDIR" Title="TortoiseGit" Absent="disallow"\r
                TypicalDefault="install" Description="The TortoiseGit package and dependencies." Display="expand" InstallDefault="local" >\r
                        <ComponentRef Id="C__infofiles" />\r
-                       <ComponentRef Id="C__apr" />\r
-<!--                   <ComponentRef Id="C__sasl" />\r
+<!--                   <ComponentRef Id="C__apr" />\r
+                       <ComponentRef Id="C__sasl" />\r
 -->                    <ComponentRef Id="C__gettext" />\r
 \r
                        <ComponentRef Id="C__help_en" />\r
+      <ComponentRef Id="C__wingit" />\r
                        <ComponentRef Id="C__TortoiseSVN" />\r
                        <ComponentRef Id="C__TortoiseSVNShortcuts" />\r
                        <ComponentRef Id="C__TortoiseMerge" />\r
@@ -24,7 +25,8 @@
                        <ComponentRef Id="C__PlatformSettingsShortcuts" />\r
                        <ComponentRef Id="C__shellregistry" />\r
                        <ComponentRef Id="C__machineregistry" />\r
-                       <ComponentRef Id="C__svnprotocoll" />\r
+<!--                   <ComponentRef Id="C__svnprotocoll" />\r
+-->\r
                        <ComponentRef Id="C__approveshellcomponents" />\r
                        <ComponentRef Id="C__ProgramMenuFolder" />\r
                        <ComponentRef Id="C__Sounds" />\r
                                <ComponentRef Id="C__iconsstraight" />\r
                        </Feature>\r
 \r
+<!--\r
                        <Feature Id="UDiffAssoc" Level="1" Title="Register diff/patch files" Description="Associate .diff and .patch files with TortoiseUDiff" TypicalDefault="install" Absent="allow">\r
                                <ComponentRef Id="C__TortoiseUDiffAssoc" />\r
                        </Feature>\r
+-->\r
 \r
-                       <?if $(var.DictionaryENGB) = 1 ?>\r
+      <?if $(var.DictionaryENGB) = 1 ?>\r
                        <Feature Id="DictionaryENGB" Level="1" Title="English (GB) dictionary" Description="English (GB) spell checker dictionary" TypicalDefault="install" Absent="allow">\r
                                <ComponentRef Id="C__DictionaryENGB" />\r
                        </Feature>\r
index 0c4da7b..a1588e0 100644 (file)
@@ -16,7 +16,7 @@
 <Include>\r
    <Directory Id="TARGETDIR" Name="SourceDir">\r
       <Directory Id="D__ProgramFilesFolder" ShortName="PFiles" Name="Program Files">\r
-        <Directory Id="INSTALLDIR" ShortName="TSVN" Name="TortoiseGit">\r
+        <Directory Id="INSTALLDIR" ShortName="TGIT" Name="TortoiseGit">\r
 \r
           <?if $(var.Platform) = "x86" ?>\r
           <Merge Id='CRT' Language='0' SourceFile='$(var.MergeModules)\microsoft_vc90_crt_x86.msm' DiskId='1' />\r
           <Component Id="C__machineregistry" Guid="$(var.GuidMachineRegistry)" Win64="$(var.Win64YesNo)">\r
             <Registry Root="HKLM" Key="Software\[Manufacturer]" Action="createKeyAndRemoveKeyOnUninstall" />\r
             <Registry Root="HKLM" Key="Software\[Manufacturer]" Name="ProcPath" Value="[INSTALLDIR]bin\TortoiseProc.exe" Type="string" />\r
-            <Registry Root="HKLM" Key="Software\[Manufacturer]" Name="CachePath" Value="[INSTALLDIR]bin\TSVNCache.exe" Type="string" />\r
+            <Registry Root="HKLM" Key="Software\[Manufacturer]" Name="CachePath" Value="[INSTALLDIR]bin\TGitCache.exe" Type="string" />\r
             <Registry Root="HKLM" Key="Software\[Manufacturer]" Name="TMergePath" Value="[INSTALLDIR]bin\TortoiseMerge.exe" Type="string" />\r
             <Registry Root="HKLM" Key="Software\[Manufacturer]" Name="Directory" Value="[INSTALLDIR]" Type="string" />\r
             <Registry Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\App Paths\SubWCRev.exe" Action="createKeyAndRemoveKeyOnUninstall" />\r
             <Registry Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{$(var.GuidIgnored)}" Value="TortoiseGit" Type="string" />\r
             <Registry Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{$(var.GuidUnversioned)}" Value="TortoiseGit" Type="string" />\r
           </Component>\r
-\r
+<!--\r
           <Component Id="C__svnprotocoll" Guid="$(var.GuidSvnProtocol)" Win64="$(var.Win64YesNo)">\r
             <Registry Root="HKMU" Key="Software\Classes\svn" KeyPath="yes" Value="URL:SVN Protocol" Type="string" />\r
             <Registry Root="HKMU" Key="Software\Classes\svn" Name="URL Protocol" Type="string" />\r
             <Registry Root="HKMU" Key="Software\Classes\tsvn\DefaultIcon" Value="[INSTALLDIR]bin\TortoiseProc.exe" Type="string" />\r
             <Registry Root="HKMU" Key="Software\Classes\tsvn\shell\open\command" Value="[INSTALLDIR]bin\TortoiseProc.exe /command:checkout /url:&quot;%1&quot;" Type="string" />\r
           </Component>\r
-\r
+ -->\r
           <Component Id="C__ASPDOTNETHACK" Guid="$(var.GuidASPNETHack)" Win64="$(var.Win64YesNo)">\r
             <Registry Root="HKCU" Key="Software\TortoiseGit" KeyPath="yes" Name="ASP.NET KeyPath" Value="ASP.NET" Type="string" />\r
             <!-- only used because this component needs a key path! -->\r
             <Environment Id="E__ASPDOTNETHACK" Action="create" Name="SVN_ASP_DOT_NET_HACK" Value="1" Permanent="yes" System="yes" />\r
           </Component>\r
           <Directory Id="D__Bin" ShortName="BIN" Name="bin" >\r
-           \r
+<!--\r
           <Component Id="C__apr" Guid="$(var.GuidAPR)" Win64="$(var.Win64YesNo)">\r
              <File Id="F__libapr" ShortName="LIBAPR.DLL" Name="libapr_tsvn.dll" DiskId="1" Source="..\..\ext\svnbin\libapr_tsvn.dll" KeyPath="yes" />\r
              <File Id="F__libaprutil" ShortName="LIBAPRUT.DLL" Name="libaprutil_tsvn.dll" DiskId="1" Source="..\..\ext\svnbin\libaprutil_tsvn.dll" />\r
           </Component>\r
-\r
+ -->\r
 <!--             <Component Id="C__sasl" Guid="$(var.GuidSASL)" Win64="$(var.Win64YesNo)">\r
              <File Id="F__libsasl" ShortName="LIBSASL.DLL" Name="libsasl.dll" DiskId="1" Source="..\..\ext\cyrus-SASL\release_$(var.PlatformPathExtension)\libsasl.dll" KeyPath="yes" />\r
               <File Id="F__saslANONYMOUS" ShortName="saslANON.DLL" Name="saslANONYMOUS.dll" DiskId="1" Source="..\..\ext\cyrus-SASL\release_$(var.PlatformPathExtension)\saslANONYMOUS.dll" />\r
 -->               <RemoveFile Id="F__Tortoise_lang"  Name="*.chm" On="uninstall" />\r
             </Component>\r
 \r
+            <Component Id="C__wingit" Guid="$(var.GuidAPR)" Win64="$(var.Win64YesNo)">\r
+              <File Id="F__wingit" ShortName="WINGIT.DLL" Name="wingit.dll" DiskId="1" Source="..\..\ext\wingit\wingit.dll" KeyPath="yes" />\r
+            </Component>\r
+            \r
             <Component Id="C__TortoiseSVN" Guid="$(var.GuidTortoiseSVN)" Win64="$(var.Win64YesNo)">\r
               <File Id="F__TortoiseProc" ShortName="TORTPROC.EXE" Name="TortoiseProc.exe" DiskId="1" Source="..\..\bin\$(var.ReleasePath)\bin\TortoiseProc.exe" KeyPath="yes" />\r
-              <File Id="F__TortoiseShell" ShortName="TORTSVN.DLL" Name="TortoiseGit.dll" DiskId="1" Source="..\..\bin\$(var.ReleasePath)\bin\TortoiseGit.dll" />\r
+              <File Id="F__TortoiseShell" ShortName="TORTGIT.DLL" Name="TortoiseGit.dll" DiskId="1" Source="..\..\bin\$(var.ReleasePath)\bin\TortoiseGit.dll" />\r
 <!--              <File Id="F__TortoiseStub" ShortName="TORTSTB.DLL" Name="TortoiseStub.dll" DiskId="1" Source="..\..\bin\$(var.ReleasePath)\bin\TortoiseStub.dll" />\r
 -->\r
 <!--              <File Id="F__TortoisePlink" ShortName="TORTPLI.EXE" Name="TortoisePlink.exe" DiskId="1" Source="..\..\bin\$(var.ReleasePath)\bin\TortoisePlink.exe" />\r
 -->\r
-<!--              <File Id="F__TSVNCache" ShortName="TSVNCACH.EXE" Name="TSVNCache.exe" DiskId="1" Source="..\..\bin\$(var.ReleasePath)\bin\TSVNCache.exe" />\r
+<!--              <File Id="F__TSVNCache" ShortName="TGITCACH.EXE" Name="TGitCache.exe" DiskId="1" Source="..\..\bin\$(var.ReleasePath)\bin\TGitCache.exe" />\r
 -->\r
               <File Id="F__TSVNAutolist" ShortName="AUTOLIST.TXT" Name="autolist.txt" DiskId="1" Source="include\autolist.txt" />\r
               <File Id="F__websiteurl" ShortName="WEBSITE.URL" Name="Website.url" Source="include\Website.url" DiskId="1" />\r
               <Shortcut Id="S__Website" Directory="D_TortoisePrgMenu"  Name="Website" Advertise="no"\r
               Target="[INSTALLDIR]bin\website.url" Description="TortoiseGit Website" />\r
 <!--\r
-              <Shortcut Id="S__RTFM" Directory="D_TortoisePrgMenu" ShortName="TSVN" Name="TortoiseGit" Advertise="no"\r
+              <Shortcut Id="S__RTFM" Directory="D_TortoisePrgMenu" ShortName="TGIT" Name="TortoiseGit" Advertise="no"\r
               Target="[INSTALLDIR]bin\TortoiseProc.exe" Description="TortoiseGit" Arguments="/command:rtfm" Show="normal" />\r
 -->\r
             <Shortcut Id="S__TortoiseProc" Directory="D_TortoisePrgMenu" Name="Help" Advertise="no"\r
               <File Id="F__TortoiseUDiff" ShortName="TUDIFF.EXE" Name="TortoiseUDiff.exe" DiskId="1" Source="..\..\bin\$(var.ReleasePath)\bin\TortoiseUDiff.exe" KeyPath="yes" />\r
             </Component>\r
 \r
+<!--\r
             <Component Id="C__TortoiseUDiffAssoc" Guid="$(var.GuidTortoiseUDiffAssoc)" Win64="$(var.Win64YesNo)">\r
               <Registry Root="HKMU" Key="Software\Classes\.diff" Action="createKeyAndRemoveKeyOnUninstall" />\r
               <Registry Root="HKMU" Key="Software\Classes\.diff" KeyPath="yes" Value="unified_diff_file" Type="string" />\r
               <Registry Root="HKMU" Key="Software\Classes\unified_diff_file\shell\open\command" Action="createKeyAndRemoveKeyOnUninstall" />\r
               <Registry Root="HKMU" Key="Software\Classes\unified_diff_file\shell\open\command" Value="[INSTALLDIR]bin\TortoiseUDiff.exe /patchfile:&quot;%1&quot;" Type="string" />\r
             </Component>\r
+-->\r
 \r
-            <Component Id="C__PlainSettingsShortcuts" Guid="$(var.GuidPlainSettingsShortcuts)" Win64="$(var.Win64YesNo)">\r
+              <Component Id="C__PlainSettingsShortcuts" Guid="$(var.GuidPlainSettingsShortcuts)" Win64="$(var.Win64YesNo)">\r
               <Registry Root="HKCU" Key="Software\TortoiseGit" KeyPath="yes" Name="TortoiseGit" Value="TortoiseGit" Type="string" />\r
               <Condition><![CDATA[NOT VersionNT64]]></Condition>\r
               <Shortcut Id="S__PlainConfig" Directory="D_TortoisePrgMenu" Name="Settings" Advertise="no"\r
index aaa2659..d929f1f 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="Windows-1252"?>\r
 <VisualStudioProject\r
        ProjectType="Visual C++"\r
-       Version="9.00"\r
+       Version="9,00"\r
        Name="TortoiseProc"\r
        ProjectGUID="{50797F06-39C5-4802-8E2B-7B7A4EF03214}"\r
        RootNamespace="TortoiseProc"\r
@@ -48,7 +48,7 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\TortoiseProc;..\Resources;&quot;$InputDir&quot;;../../ext/ResizableLib;../Git;&quot;../../ext/apr-util/include&quot;;&quot;../../ext/apr-util/xml/expat/lib&quot;;../../ext/Subversion/subversion/include;../../ext/Subversion/subversion/libsvn_client;../../ext/apr/include;../../ext/boost;..\Utils;..\SVN;..\..\ext\ResizableLib;..\crashrpt;&quot;..\..\ext\libintl\libintl3-win32\inc&quot;;..\..\ext\hunspell;..\..\ext\scintilla\include;..\Utils\TreePropSheet;..\Utils\ColourPickerXP;..\Utils\NewMenu;..\Utils\MiscUI;..\LogCache;&quot;../../ext/cyrus-sasl/include&quot;;../../../common/openssl/inc32;.\RevisionGraph;..\TortoiseShell"\r
+                               AdditionalIncludeDirectories="&quot;$InputDir&quot;;../../ext/ResizableLib;../Git;&quot;../../ext/apr-util/include&quot;;&quot;../../ext/apr-util/xml/expat/lib&quot;;../../ext/Subversion/subversion/include;../../ext/Subversion/subversion/libsvn_client;../../ext/apr/include;../../ext/boost;..\TortoiseProc;..\Utils;..\SVN;..\..\ext\ResizableLib;..\crashrpt;&quot;..\..\ext\libintl\libintl3-win32\inc&quot;;..\..\ext\hunspell;..\..\ext\scintilla\include;..\Utils\TreePropSheet;..\Utils\ColourPickerXP;..\Utils\NewMenu;..\Utils\MiscUI;..\LogCache;&quot;../../ext/cyrus-sasl/include&quot;;../../../common/openssl/inc32;.\RevisionGraph;../../ext/wingit"\r
                                PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;SVN_DEBUG;ENABLE_NLS;THESAURUS"\r
                                MinimalRebuild="true"\r
                                ExceptionHandling="2"\r
@@ -77,6 +77,7 @@
                                Name="VCLinkerTool"\r
                                AdditionalDependencies="Crypt32.lib gdiplus.lib shfolder.lib shell32.lib comctl32.lib ws2_32.lib rpcrt4.lib shlwapi.lib wininet.lib version.lib"\r
                                LinkIncremental="2"\r
+                               AdditionalLibraryDirectories="../../ext/wingit"\r
                                IgnoreDefaultLibraryNames="libcd.lib;libc;shell32;LIBCMTD;"\r
                                DelayLoadDLLs="gdiplus.dll"\r
                                GenerateDebugInformation="true"\r
                                Optimization="1"\r
                                InlineFunctionExpansion="1"\r
                                FavorSizeOrSpeed="2"\r
-                               AdditionalIncludeDirectories="..\TortoiseProc;..\Resources;&quot;$InputDir&quot;;../../ext/ResizableLib;../Git;&quot;../../ext/apr-util/include&quot;;&quot;../../ext/apr-util/xml/expat/lib&quot;;../../ext/Subversion/subversion/include;../../ext/Subversion/subversion/libsvn_client;../../ext/apr/include;../../ext/boost;..\Utils;..\SVN;..\..\ext\ResizableLib;..\crashrpt;&quot;..\..\ext\libintl\libintl3-win32\inc&quot;;..\..\ext\hunspell;..\..\ext\scintilla\include;..\Utils\TreePropSheet;..\Utils\ColourPickerXP;..\Utils\NewMenu;..\Utils\MiscUI;..\LogCache;&quot;../../ext/cyrus-sasl/include&quot;;../../../common/openssl/inc32;.\RevisionGraph;..\TortoiseShell"\r
+                               AdditionalIncludeDirectories="&quot;$InputDir&quot;;../../ext/ResizableLib;../Git;&quot;../../ext/apr-util/include&quot;;&quot;../../ext/apr-util/xml/expat/lib&quot;;../../ext/Subversion/subversion/include;../../ext/Subversion/subversion/libsvn_client;../../ext/apr/include;../../ext/boost;..\TortoiseProc;..\Utils;..\SVN;..\..\ext\ResizableLib;..\crashrpt;&quot;..\..\ext\libintl\libintl3-win32\inc&quot;;..\..\ext\hunspell;..\..\ext\scintilla\include;..\Utils\TreePropSheet;..\Utils\ColourPickerXP;..\Utils\NewMenu;..\Utils\MiscUI;..\LogCache;&quot;../../ext/cyrus-sasl/include&quot;;../../../common/openssl/inc32;.\RevisionGraph;../../ext/wingit"\r
                                PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;THESAURUS"\r
                                StringPooling="true"\r
                                MinimalRebuild="false"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="Crypt32.lib gdiplus.lib shfolder.lib shell32.lib comctl32.lib ws2_32.lib rpcrt4.lib shlwapi.lib wininet.lib version.lib"\r
+                               AdditionalDependencies="Crypt32.lib gdiplus.lib shfolder.lib shell32.lib comctl32.lib ws2_32.lib rpcrt4.lib shlwapi.lib wininet.lib version.lib wingit.lib"\r
                                LinkIncremental="1"\r
+                               AdditionalLibraryDirectories="../../ext/wingit"\r
                                IgnoreDefaultLibraryNames="libcd.lib;libc;shell32;LIBCMT"\r
                                DelayLoadDLLs="gdiplus.dll"\r
                                GenerateDebugInformation="true"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\TortoiseProc;..\Resources;&quot;$InputDir&quot;;../../ext/ResizableLib;../Git;&quot;../../ext/apr-util/include&quot;;&quot;../../ext/apr-util/xml/expat/lib&quot;;../../ext/Subversion/subversion/include;../../ext/Subversion/subversion/libsvn_client;../../ext/apr/include;../../ext/boost;..\Utils;..\SVN;..\..\ext\ResizableLib;..\crashrpt;&quot;..\..\ext\libintl\libintl3-win32\inc&quot;;..\..\ext\hunspell;..\..\ext\scintilla\include;..\Utils\TreePropSheet;..\Utils\ColourPickerXP;..\Utils\NewMenu;..\Utils\MiscUI;..\LogCache;&quot;../../ext/cyrus-sasl/include&quot;;../../../common/openssl/inc32;.\RevisionGraph;..\TortoiseShell"\r
+                               AdditionalIncludeDirectories="&quot;$InputDir&quot;;../../ext/ResizableLib;../Git;&quot;../../ext/apr-util/include&quot;;&quot;../../ext/apr-util/xml/expat/lib&quot;;../../ext/Subversion/subversion/include;../../ext/Subversion/subversion/libsvn_client;../../ext/apr/include;../../ext/boost;..\TortoiseProc;..\Utils;..\SVN;..\..\ext\ResizableLib;..\crashrpt;&quot;..\..\ext\libintl\libintl3-win32\inc&quot;;..\..\ext\hunspell;..\..\ext\scintilla\include;..\Utils\TreePropSheet;..\Utils\ColourPickerXP;..\Utils\NewMenu;..\Utils\MiscUI;..\LogCache;&quot;../../ext/cyrus-sasl/include&quot;;../../../common/openssl/inc32;.\RevisionGraph"\r
                                PreprocessorDefinitions="WIN64;_WINDOWS;_DEBUG;SVN_DEBUG;ENABLE_NLS;THESAURUS"\r
                                MinimalRebuild="true"\r
                                ExceptionHandling="2"\r
                                Name="VCLinkerTool"\r
                                AdditionalDependencies="Crypt32.lib gdiplus.lib shfolder.lib shell32.lib comctl32.lib ws2_32.lib rpcrt4.lib shlwapi.lib wininet.lib version.lib"\r
                                LinkIncremental="2"\r
-                               IgnoreDefaultLibraryNames="libcd.lib;libc;shell32;LIBCMT"\r
+                               IgnoreDefaultLibraryNames="shell32;msvcrt.lib"\r
                                DelayLoadDLLs="gdiplus.dll"\r
                                GenerateDebugInformation="true"\r
                                SubSystem="2"\r
index 9736145..ead4a78 100644 (file)
@@ -333,7 +333,7 @@ STDMETHODIMP CShellExt::Initialize(LPCITEMIDLIST pIDFolder,
                                                        }\r
                                                        catch ( ... )\r
                                                        {\r
-                                                               ATLTRACE2(_T("Exception in GitStatus::GetAllStatus()\n"));\r
+                                                               ATLTRACE2(_T("Exception in GitStatus::GetStatus()\n"));\r
                                                        }\r
                                                        if ((status != git_wc_status_unversioned)&&(status != git_wc_status_ignored)&&(status != git_wc_status_none))\r
                                                                itemStates |= ITEMIS_INSVN;\r
@@ -432,7 +432,7 @@ STDMETHODIMP CShellExt::Initialize(LPCITEMIDLIST pIDFolder,
                                                                }\r
                                                                catch ( ... )\r
                                                                {\r
-                                                                       ATLTRACE2(_T("Exception in GitStatus::GetAllStatus()\n"));\r
+                                                                       ATLTRACE2(_T("Exception in GitStatus::GetStatus()\n"));\r
                                                                }\r
                                                        }\r
                                                        if ((status != git_wc_status_unversioned)&&(status != git_wc_status_ignored)&&(status != git_wc_status_none))\r
@@ -545,7 +545,7 @@ STDMETHODIMP CShellExt::Initialize(LPCITEMIDLIST pIDFolder,
                        }\r
                        catch ( ... )\r
                        {\r
-                               ATLTRACE2(_T("Exception in GitStatus::GetAllStatus()\n"));\r
+                               ATLTRACE2(_T("Exception in GitStatus::GetStatus()\n"));\r
                        }\r
                }\r
                else\r
@@ -601,7 +601,7 @@ STDMETHODIMP CShellExt::Initialize(LPCITEMIDLIST pIDFolder,
                                        }\r
                                        catch ( ... )\r
                                        {\r
-                                               ATLTRACE2(_T("Exception in GitStatus::GetAllStatus()\n"));\r
+                                               ATLTRACE2(_T("Exception in GitStatus::GetStatus()\n"));\r
                                        }\r
                                }\r
                                else\r
index 5627945..55b56b7 100644 (file)
@@ -132,7 +132,7 @@ STDMETHODIMP CShellExt::IsMemberOf(LPCWSTR pwszPath, DWORD /*dwAttrib*/)
                        }\r
                        return S_FALSE;\r
                }\r
-#if 0\r
+\r
                switch (g_ShellCache.GetCacheType())\r
                {\r
                case ShellCache::exe:\r
@@ -140,22 +140,21 @@ STDMETHODIMP CShellExt::IsMemberOf(LPCWSTR pwszPath, DWORD /*dwAttrib*/)
 #if 0\r
                                TSVNCacheResponse itemStatus;\r
                                SecureZeroMemory(&itemStatus, sizeof(itemStatus));\r
-                               if (m_remoteCacheLink.GetStatusFromRemoteCache(CTSVNPath(pPath), &itemStatus, true))\r
+                               if (m_remoteCacheLink.GetStatusFromRemoteCache(CTGitPath(pPath), &itemStatus, true))\r
                                {\r
-                                       status = SVNStatus::GetMoreImportant(itemStatus.m_status.text_status, itemStatus.m_status.prop_status);\r
+                                       status = GitStatus::GetMoreImportant(itemStatus.m_status.text_status, itemStatus.m_status.prop_status);\r
                                        if ((itemStatus.m_kind == git_node_file)&&(status == git_wc_status_normal)&&((itemStatus.m_needslock && itemStatus.m_owner[0]==0)||(itemStatus.m_readonly)))\r
                                                readonlyoverlay = true;\r
                                        if (itemStatus.m_owner[0]!=0)\r
                                                lockedoverlay = true;\r
                                }\r
-#endif \r
+#endif\r
                        }\r
-//                     break;\r
+                       break;\r
                case ShellCache::dll:\r
                        {\r
                                // Look in our caches for this item \r
-#if 0\r
-                               const FileStatusCacheEntry * s = m_CachedStatus.GetCachedItem(CTSVNPath(pPath));\r
+                               const FileStatusCacheEntry * s = m_CachedStatus.GetCachedItem(CTGitPath(pPath));\r
                                if (s)\r
                                {\r
                                        status = s->status;\r
@@ -177,9 +176,11 @@ STDMETHODIMP CShellExt::IsMemberOf(LPCWSTR pwszPath, DWORD /*dwAttrib*/)
                                                        }\r
                                                        else\r
                                                        {\r
-                                                               const FileStatusCacheEntry * s = m_CachedStatus.GetFullStatus(CTSVNPath(pPath), TRUE);\r
+                                                               const FileStatusCacheEntry * s = m_CachedStatus.GetFullStatus(CTGitPath(pPath), TRUE);\r
                                                                status = s->status;\r
-                                                               status = SVNStatus::GetMoreImportant(git_wc_status_normal, status);\r
+                                                               // if get status fails then display status as 'normal' on folder (since it contains .git)\r
+                                                               // TODO: works for svn since each folder has .svn, not sure if git needs additinoal processing\r
+                                                               status = GitStatus::GetMoreImportant(git_wc_status_normal, status);\r
                                                        }\r
                                                }\r
                                                else\r
@@ -189,7 +190,7 @@ STDMETHODIMP CShellExt::IsMemberOf(LPCWSTR pwszPath, DWORD /*dwAttrib*/)
                                        }\r
                                        else\r
                                        {\r
-                                               const FileStatusCacheEntry * s = m_CachedStatus.GetFullStatus(CTSVNPath(pPath), FALSE);\r
+                                               const FileStatusCacheEntry * s = m_CachedStatus.GetFullStatus(CTGitPath(pPath), FALSE);\r
                                                status = s->status;\r
                                        }\r
                                }\r
@@ -197,7 +198,6 @@ STDMETHODIMP CShellExt::IsMemberOf(LPCWSTR pwszPath, DWORD /*dwAttrib*/)
                                        readonlyoverlay = true;\r
                                if ((s)&&(s->owner[0]!=0))\r
                                        lockedoverlay = true;\r
-#endif\r
                        }\r
 \r
                        break;\r
@@ -225,25 +225,13 @@ STDMETHODIMP CShellExt::IsMemberOf(LPCWSTR pwszPath, DWORD /*dwAttrib*/)
                        break;\r
                }\r
                ATLTRACE(_T("Status %d for file %s\n"), status, pwszPath);\r
-#endif \r
-       }\r
-\r
-       if (PathIsDirectory(pPath))\r
-       {\r
-               if (g_ShellCache.HasSVNAdminDir(pPath, TRUE))\r
-               {\r
-                       status = git_wc_status_normal;          \r
-               }else\r
-               {\r
-                       status = git_wc_status_none;\r
-               }\r
        }\r
        g_filepath.clear();\r
        g_filepath = pPath;\r
        g_filestatus = status;\r
        g_readonlyoverlay = readonlyoverlay;\r
        g_lockedoverlay = lockedoverlay;\r
-       \r
+\r
        //the priority system of the shell doesn't seem to work as expected (or as I expected):\r
        //as it seems that if one handler returns S_OK then that handler is used, no matter\r
        //if other handlers would return S_OK too (they're never called on my machine!)\r
index 849b5ca..63cc97c 100644 (file)
@@ -146,6 +146,7 @@ public:
        }\r
        CacheType GetCacheType()\r
        {\r
+return dll;\r
                if ((GetTickCount() - REGISTRYTIMEOUT) > cachetypeticker)\r
                {\r
                        cachetypeticker = GetTickCount();\r
@@ -435,7 +436,7 @@ public:
                }\r
                return &columnrevformat;\r
        }\r
-       BOOL HasSVNAdminDir(LPCTSTR path, BOOL bIsDir)\r
+       BOOL HasSVNAdminDir(LPCTSTR path, BOOL bIsDir, CString *ProjectTopDir = NULL)\r
        {\r
                size_t len = _tcslen(path);\r
                TCHAR * buf = new TCHAR[len+1];\r
@@ -450,18 +451,31 @@ public:
                }\r
                if ((GetTickCount() - ADMINDIRTIMEOUT) < admindirticker)\r
                {\r
-                       std::map<stdstring, BOOL>::iterator iter;\r
+                       std::map<stdstring, AdminDir_s>::iterator iter;\r
                        sAdminDirCacheKey.assign(buf);\r
                        if ((iter = admindircache.find(sAdminDirCacheKey)) != admindircache.end())\r
                        {\r
                                delete [] buf;\r
-                               return iter->second;\r
+                               if (ProjectTopDir && iter->second.bHasAdminDir)\r
+                                       *ProjectTopDir = iter->second.sProjectRoot.c_str();\r
+                               return iter->second.bHasAdminDir;\r
                        }\r
                }\r
-               BOOL hasAdminDir = g_GitAdminDir.HasAdminDir(buf, true);\r
+               CString sProjectRoot;\r
+               BOOL hasAdminDir = g_GitAdminDir.HasAdminDir(buf, true, &sProjectRoot);\r
                admindirticker = GetTickCount();\r
                Locker lock(m_critSec);\r
-               admindircache[buf] = hasAdminDir;\r
+\r
+               AdminDir_s &ad = admindircache[buf];\r
+               ad.bHasAdminDir = hasAdminDir;\r
+               if (hasAdminDir)\r
+               {\r
+                       ad.sProjectRoot.assign(sProjectRoot);\r
+\r
+                       if (ProjectTopDir)\r
+                               *ProjectTopDir = sProjectRoot;\r
+               }\r
+\r
                delete [] buf;\r
                return hasAdminDir;\r
        }\r
@@ -568,6 +582,13 @@ private:
                        includeliststr = (stdstring)includelist;\r
                }\r
        }\r
+\r
+       struct AdminDir_s\r
+       {\r
+               BOOL bHasAdminDir;\r
+               stdstring sProjectRoot;\r
+       };\r
+\r
        CRegStdWORD cachetype;\r
        CRegStdWORD blockstatus;\r
        CRegStdWORD langid;\r
@@ -623,7 +644,7 @@ private:
        NUMBERFMT columnrevformat;\r
        TCHAR szDecSep[5];\r
        TCHAR szThousandsSep[5];\r
-       std::map<stdstring, BOOL> admindircache;\r
+       std::map<stdstring, AdminDir_s> admindircache;\r
        stdstring sAdminDirCacheKey;\r
        CRegStdString nocontextpaths;\r
        stdstring excludecontextstr;\r
index 46b9ea0..edefe5d 100644 (file)
@@ -24,7 +24,7 @@
 #include "ShellCache.h"\r
 #include "RemoteCacheLink.h"\r
 #include "GitStatus.h"\r
-//#include "SVNFolderStatus.h"\r
+#include "GitFolderStatus.h"\r
 #include "uxtheme.h"\r
 \r
 extern UINT                            g_cRefThisDll;                  // Reference count of this DLL.\r
@@ -208,7 +208,7 @@ protected:
        git_wc_status_kind      filestatus;\r
        std::map<UINT, HBITMAP> bitmaps;\r
 \r
-//     SVNFolderStatus         m_CachedStatus;         // status cache\r
+       GitFolderStatus         m_CachedStatus;         // status cache\r
        CRemoteCacheLink        m_remoteCacheLink;\r
 \r
        FN_GetBufferedPaintBits pfnGetBufferedPaintBits;\r
index 003a3cd..6d72886 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="Windows-1252"?>\r
 <VisualStudioProject\r
        ProjectType="Visual C++"\r
-       Version="9.00"\r
+       Version="9,00"\r
        Name="TortoiseShell"\r
        ProjectGUID="{E873DD32-5A31-4DE1-8341-A56A2A5489EA}"\r
        RootNamespace="TortoiseShell"\r
@@ -52,7 +52,7 @@
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
                                InlineFunctionExpansion="0"\r
-                               AdditionalIncludeDirectories="&quot;../Git&quot;;&quot;../../ext/apr-util/include&quot;;&quot;../../ext/apr-util/xml/expat/lib&quot;;../../ext/Subversion/subversion/include;../../ext/apr/include;../Utils;..\TortoiseShell;..\SVN;&quot;..\..\ext\libintl\libintl3-win32\inc&quot;;..\Utils\MiscUI"\r
+                               AdditionalIncludeDirectories="&quot;../Git&quot;;&quot;../../ext/apr-util/include&quot;;&quot;../../ext/apr-util/xml/expat/lib&quot;;../../ext/Subversion/subversion/include;../../ext/apr/include;../Utils;..\TortoiseShell;..\SVN;&quot;..\..\ext\libintl\libintl3-win32\inc&quot;;..\Utils\MiscUI;../../ext/wingit"\r
                                PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SVN_DEBUG"\r
                                BasicRuntimeChecks="1"\r
                                RuntimeLibrary="3"\r
@@ -88,6 +88,7 @@
                                OutputFile="$(OutDir)/TortoiseGit.dll"\r
                                LinkIncremental="0"\r
                                SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="../../ext/wingit"\r
                                IgnoreAllDefaultLibraries="false"\r
                                IgnoreDefaultLibraryNames="LIBC"\r
                                ModuleDefinitionFile=".\ShellExt.def"\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="Debug|x64"\r
-                       OutputDirectory="..\..\bin\Debug64\bin"\r
-                       IntermediateDirectory="..\..\obj\TortoiseShell\Debug64"\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="..\..\bin\$(ConfigurationName)\bin"\r
+                       IntermediateDirectory="..\..\obj\TortoiseShell\$(ConfigurationName)\"\r
                        ConfigurationType="2"\r
                        UseOfMFC="0"\r
                        UseOfATL="1"\r
                        ATLMinimizesCRunTimeLibraryUsage="false"\r
                        CharacterSet="1"\r
+                       WholeProgramOptimization="1"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
-                               PreprocessorDefinitions="_DEBUG"\r
+                               PreprocessorDefinitions="NDEBUG"\r
                                MkTypLibCompatible="true"\r
                                SuppressStartupBanner="true"\r
-                               TargetEnvironment="3"\r
-                               TypeLibraryName=".\Debug/TortoiseShell.tlb"\r
+                               TargetEnvironment="1"\r
+                               TypeLibraryName=".\Release/TortoiseShell.tlb"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
-                               InlineFunctionExpansion="0"\r
-                               AdditionalIncludeDirectories="&quot;../Git&quot;;&quot;../../ext/apr-util/include&quot;;&quot;../../ext/apr-util/xml/expat/lib&quot;;../../ext/Subversion/subversion/include;../../ext/apr/include;../Utils;..\TortoiseShell;..\SVN;&quot;..\..\ext\libintl\libintl3-win32\inc&quot;;..\Utils\MiscUI"\r
-                               PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;_USRDLL;SVN_DEBUG"\r
-                               BasicRuntimeChecks="1"\r
-                               RuntimeLibrary="3"\r
+                               InlineFunctionExpansion="1"\r
+                               EnableIntrinsicFunctions="true"\r
+                               FavorSizeOrSpeed="1"\r
+                               OmitFramePointers="true"\r
+                               AdditionalIncludeDirectories="&quot;../Git&quot;;&quot;../../ext/apr-util/include&quot;;&quot;../../ext/apr-util/xml/expat/lib&quot;;../../ext/Subversion/subversion/include;../../ext/apr/include;../Utils;..\TortoiseShell;..\SVN;&quot;..\..\ext\libintl\libintl3-win32\inc&quot;;..\Utils\MiscUI;../../ext/wingit"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="2"\r
+                               BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="false"\r
                                ForceConformanceInForLoopScope="true"\r
-                               RuntimeTypeInfo="true"\r
                                UsePrecompiledHeader="2"\r
-                               AssemblerListingLocation="..\..\obj\TortoiseShell\Debug64/"\r
-                               ObjectFile="..\..\obj\TortoiseShell\Debug64/"\r
-                               ProgramDataBaseFileName="..\..\obj\TortoiseShell\Debug64/"\r
+                               AssemblerListingLocation="..\..\obj\TortoiseShell\Release/"\r
+                               ObjectFile="..\..\obj\TortoiseShell\Release/"\r
+                               ProgramDataBaseFileName="..\..\obj\TortoiseShell\Release/"\r
                                WarningLevel="4"\r
                                SuppressStartupBanner="true"\r
-                               DebugInformationFormat="3"\r
                                CompileAs="0"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="_DEBUG;TSVNSHELL"\r
+                               PreprocessorDefinitions="NDEBUG;TSVNSHELL"\r
                                Culture="1033"\r
                        />\r
                        <Tool\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                IgnoreImportLibrary="true"\r
-                               AdditionalDependencies="Crypt32.lib gdiplus.lib shfolder.lib shell32.lib comctl32.lib ws2_32.lib rpcrt4.lib shlwapi.lib wininet.lib version.lib"\r
-                               OutputFile="$(OutDir)/TortoiseSVN.dll"\r
-                               LinkIncremental="0"\r
+                               AdditionalOptions="/MACHINE:I386"\r
+                               AdditionalDependencies="Crypt32.lib gdiplus.lib shfolder.lib shell32.lib comctl32.lib ws2_32.lib rpcrt4.lib shlwapi.lib wininet.lib version.lib wingit.lib"\r
+                               OutputFile="$(OutDir)/TortoiseGit.dll"\r
+                               LinkIncremental="1"\r
                                SuppressStartupBanner="true"\r
-                               IgnoreAllDefaultLibraries="false"\r
-                               IgnoreDefaultLibraryNames="LIBC"\r
+                               AdditionalLibraryDirectories="../../ext/wingit"\r
+                               IgnoreDefaultLibraryNames="libcd, libc, shell32"\r
                                ModuleDefinitionFile=".\ShellExt.def"\r
                                DelayLoadDLLs="gdiplus.dll"\r
                                GenerateDebugInformation="true"\r
-                               ProgramDatabaseFile="$(OutDir)/TortoiseSVN.pdb"\r
+                               ProgramDatabaseFile="$(OutDir)/TortoiseShell.pdb"\r
+                               SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               OptimizeForWindows98="0"\r
                                BaseAddress="0x5960000"\r
                                RandomizedBaseAddress="1"\r
                                DataExecutionPrevention="0"\r
-                               ImportLibrary="..\..\obj\TortoiseShell\Debug64/TortoiseSVN.lib"\r
-                               TargetMachine="17"\r
+                               ImportLibrary="..\..\obj\TortoiseShell\Release/TortoiseSVN.lib"\r
+                               TargetMachine="1"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="Release|Win32"\r
-                       OutputDirectory="..\..\bin\$(ConfigurationName)\bin"\r
-                       IntermediateDirectory="..\..\obj\TortoiseShell\$(ConfigurationName)\"\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="..\..\bin\Debug64\bin"\r
+                       IntermediateDirectory="..\..\obj\TortoiseShell\Debug64"\r
                        ConfigurationType="2"\r
                        UseOfMFC="0"\r
                        UseOfATL="1"\r
                        ATLMinimizesCRunTimeLibraryUsage="false"\r
                        CharacterSet="1"\r
-                       WholeProgramOptimization="1"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
+                               PreprocessorDefinitions="_DEBUG"\r
                                MkTypLibCompatible="true"\r
                                SuppressStartupBanner="true"\r
-                               TargetEnvironment="1"\r
-                               TypeLibraryName=".\Release/TortoiseShell.tlb"\r
+                               TargetEnvironment="3"\r
+                               TypeLibraryName=".\Debug/TortoiseShell.tlb"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               InlineFunctionExpansion="1"\r
-                               EnableIntrinsicFunctions="true"\r
-                               FavorSizeOrSpeed="1"\r
-                               OmitFramePointers="true"\r
+                               Optimization="0"\r
+                               InlineFunctionExpansion="0"\r
                                AdditionalIncludeDirectories="&quot;../Git&quot;;&quot;../../ext/apr-util/include&quot;;&quot;../../ext/apr-util/xml/expat/lib&quot;;../../ext/Subversion/subversion/include;../../ext/apr/include;../Utils;..\TortoiseShell;..\SVN;&quot;..\..\ext\libintl\libintl3-win32\inc&quot;;..\Utils\MiscUI"\r
-                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="2"\r
-                               BufferSecurityCheck="false"\r
-                               EnableFunctionLevelLinking="false"\r
+                               PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;_USRDLL;SVN_DEBUG"\r
+                               BasicRuntimeChecks="1"\r
+                               RuntimeLibrary="3"\r
                                ForceConformanceInForLoopScope="true"\r
+                               RuntimeTypeInfo="true"\r
                                UsePrecompiledHeader="2"\r
-                               AssemblerListingLocation="..\..\obj\TortoiseShell\Release/"\r
-                               ObjectFile="..\..\obj\TortoiseShell\Release/"\r
-                               ProgramDataBaseFileName="..\..\obj\TortoiseShell\Release/"\r
+                               AssemblerListingLocation="..\..\obj\TortoiseShell\Debug64/"\r
+                               ObjectFile="..\..\obj\TortoiseShell\Debug64/"\r
+                               ProgramDataBaseFileName="..\..\obj\TortoiseShell\Debug64/"\r
                                WarningLevel="4"\r
                                SuppressStartupBanner="true"\r
+                               DebugInformationFormat="3"\r
                                CompileAs="0"\r
                                DisableSpecificWarnings="4996,4018"\r
                        />\r
                        />\r
                        <Tool\r
                                Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG;TSVNSHELL"\r
+                               PreprocessorDefinitions="_DEBUG;TSVNSHELL"\r
                                Culture="1033"\r
                        />\r
                        <Tool\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                IgnoreImportLibrary="true"\r
-                               AdditionalOptions="/MACHINE:I386"\r
                                AdditionalDependencies="Crypt32.lib gdiplus.lib shfolder.lib shell32.lib comctl32.lib ws2_32.lib rpcrt4.lib shlwapi.lib wininet.lib version.lib"\r
-                               OutputFile="$(OutDir)/TortoiseGit.dll"\r
-                               LinkIncremental="1"\r
+                               OutputFile="$(OutDir)/TortoiseSVN.dll"\r
+                               LinkIncremental="0"\r
                                SuppressStartupBanner="true"\r
-                               IgnoreDefaultLibraryNames="libcd, libc, shell32"\r
+                               IgnoreAllDefaultLibraries="false"\r
+                               IgnoreDefaultLibraryNames="LIBC"\r
                                ModuleDefinitionFile=".\ShellExt.def"\r
                                DelayLoadDLLs="gdiplus.dll"\r
                                GenerateDebugInformation="true"\r
-                               ProgramDatabaseFile="$(OutDir)/TortoiseShell.pdb"\r
-                               SubSystem="2"\r
-                               OptimizeReferences="2"\r
-                               EnableCOMDATFolding="2"\r
-                               OptimizeForWindows98="0"\r
+                               ProgramDatabaseFile="$(OutDir)/TortoiseSVN.pdb"\r
                                BaseAddress="0x5960000"\r
                                RandomizedBaseAddress="1"\r
                                DataExecutionPrevention="0"\r
-                               ImportLibrary="..\..\obj\TortoiseShell\Release/TortoiseSVN.lib"\r
-                               TargetMachine="1"\r
+                               ImportLibrary="..\..\obj\TortoiseShell\Debug64/TortoiseSVN.lib"\r
+                               TargetMachine="17"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\Git\GitFolderStatus.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\Git\GitRev.cpp"\r
                                >\r
                        </File>\r
                                        />\r
                                </FileConfiguration>\r
                                <FileConfiguration\r
-                                       Name="Debug|x64"\r
+                                       Name="Release|Win32"\r
                                        >\r
                                        <Tool\r
                                                Name="VCCLCompilerTool"\r
                                        />\r
                                </FileConfiguration>\r
                                <FileConfiguration\r
-                                       Name="Release|Win32"\r
+                                       Name="Debug|x64"\r
                                        >\r
                                        <Tool\r
                                                Name="VCCLCompilerTool"\r