OSDN Git Service

Add pull and fetch document
[tortoisegit/TortoiseGitJp.git] / src / TGitCache / CachedDirectory.h
index 08e76cc..4d32ec0 100644 (file)
 class CCachedDirectory\r
 {\r
 public:\r
-       typedef std::map<CTSVNPath, CCachedDirectory *> CachedDirMap; \r
+       typedef std::map<CTGitPath, CCachedDirectory *> CachedDirMap; \r
        typedef CachedDirMap::iterator ItDir;\r
 \r
 public:\r
 \r
        CCachedDirectory();\r
-       CCachedDirectory(const CTSVNPath& directoryPath);\r
+       CCachedDirectory(const CTGitPath& directoryPath);\r
        ~CCachedDirectory(void);\r
-       CStatusCacheEntry GetStatusForMember(const CTSVNPath& path, bool bRecursive, bool bFetch = true);\r
+       CStatusCacheEntry GetStatusForMember(const CTGitPath& path, bool bRecursive, bool bFetch = true);\r
        CStatusCacheEntry GetOwnStatus(bool bRecursive);\r
        bool IsOwnStatusValid() const;\r
        void Invalidate();\r
@@ -46,17 +46,18 @@ public:
        BOOL SaveToDisk(FILE * pFile);\r
        BOOL LoadFromDisk(FILE * pFile);\r
        /// Get the current full status of this folder\r
-       svn_wc_status_kind GetCurrentFullStatus() {return m_currentFullStatus;}\r
+       git_wc_status_kind GetCurrentFullStatus() {return m_currentFullStatus;}\r
 private:\r
-       static svn_error_t* GetStatusCallback(void *baton, const char *path, svn_wc_status2_t *status, apr_pool_t *pool);\r
-       void AddEntry(const CTSVNPath& path, const svn_wc_status2_t* pSVNStatus, DWORD validuntil = 0);\r
-       CString GetCacheKey(const CTSVNPath& path);\r
+//     static git_error_t* GetStatusCallback(void *baton, const char *path, git_wc_status2_t *status);\r
+       static BOOL GetStatusCallback(const struct wgFile_s *pFile, void *pUserData);\r
+       void AddEntry(const CTGitPath& path, const git_wc_status2_t* pGitStatus, DWORD validuntil = 0);\r
+       CString GetCacheKey(const CTGitPath& path);\r
        CString GetFullPathString(const CString& cacheKey);\r
-       CStatusCacheEntry LookForItemInCache(const CTSVNPath& path, bool &bFound);\r
-       void UpdateChildDirectoryStatus(const CTSVNPath& childDir, svn_wc_status_kind childStatus);\r
+       CStatusCacheEntry LookForItemInCache(const CTGitPath& path, bool &bFound);\r
+       void UpdateChildDirectoryStatus(const CTGitPath& childDir, git_wc_status_kind childStatus);\r
 \r
        // Calculate the complete, composite status from ourselves, our files, and our descendants\r
-       svn_wc_status_kind CalculateRecursiveStatus();\r
+       git_wc_status_kind CalculateRecursiveStatus();\r
 \r
        // Update our composite status and deal with things if it's changed\r
        void UpdateCurrentStatus();\r
@@ -66,35 +67,35 @@ private:
        CComAutoCriticalSection m_critSec;\r
        CComAutoCriticalSection m_critSecPath;\r
 \r
-       CTSVNPath       m_currentStatusFetchingPath;\r
+       CTGitPath       m_currentStatusFetchingPath;\r
        DWORD           m_currentStatusFetchingPathTicks;\r
        // The cache of files and directories within this directory\r
        typedef std::map<CString, CStatusCacheEntry> CacheEntryMap; \r
        CacheEntryMap m_entryCache; \r
 \r
        /// A vector if iterators to child directories - used to put-together recursive status\r
-       typedef std::map<CTSVNPath, svn_wc_status_kind>  ChildDirStatus;\r
+       typedef std::map<CTGitPath, git_wc_status_kind>  ChildDirStatus;\r
        ChildDirStatus m_childDirectories;\r
 \r
-       // The timestamp of the .SVN\entries file.  For an unversioned directory, this will be zero\r
-       __int64 m_entriesFileTime;\r
+       // The timestamp of the .git\index file.  For an unversioned directory, this will be zero\r
+       __int64 m_indexFileTime;\r
        // The timestamp of the .SVN\props dir.  For an unversioned directory, this will be zero\r
-       __int64 m_propsFileTime;\r
+//     __int64 m_propsFileTime;\r
        \r
        // The path of the directory with this object looks after\r
-       CTSVNPath       m_directoryPath;\r
+       CTGitPath       m_directoryPath;\r
 \r
        // The status of THIS directory (not a composite of children or members)\r
        CStatusCacheEntry m_ownStatus;\r
 \r
        // Our current fully recursive status\r
-       svn_wc_status_kind  m_currentFullStatus;\r
+       git_wc_status_kind  m_currentFullStatus;\r
        bool m_bCurrentFullStatusValid;\r
 \r
        // The most important status from all our file entries\r
-       svn_wc_status_kind m_mostImportantFileStatus;\r
+       git_wc_status_kind m_mostImportantFileStatus;\r
 \r
        bool m_bRecursive;              // used in the status callback\r
-       friend class CSVNStatusCache;           \r
+       friend class CGitStatusCache;           \r
 };\r
 \r