コード例 #1
0
ファイル: GITStatusCache.cpp プロジェクト: hfeeki/TortoiseGit
bool CGitStatusCache::UnBlockPath(const CTGitPath& path)
{
    bool ret = false;
    AutoLocker lock(m_NoWatchPathCritSec);
    std::map<CTGitPath, DWORD>::iterator it = m_NoWatchPaths.find(path.GetDirectory());
    if (it != m_NoWatchPaths.end())
    {
        ATLTRACE(_T("path removed from no good: %s\n"), it->first.GetWinPath());
        m_NoWatchPaths.erase(it);
        ret = true;
    }
    AddFolderForCrawling(path.GetDirectory());

    return ret;
}
コード例 #2
0
bool CGitStatusCache::UnBlockPath(const CTGitPath& path)
{
	bool ret = false;
	AutoLocker lock(m_NoWatchPathCritSec);
	std::map<CTGitPath, DWORD>::iterator it = m_NoWatchPaths.find(path.GetDirectory());
	if (it != m_NoWatchPaths.end())
	{
		CTraceToOutputDebugString::Instance()(_T(__FUNCTION__) _T(": path removed from no good: %s\n"), it->first.GetWinPath());
		m_NoWatchPaths.erase(it);
		ret = true;
	}
	AddFolderForCrawling(path.GetDirectory());

	return ret;
}
コード例 #3
0
bool CSVNStatusCache::UnBlockPath(const CTSVNPath& path)
{
    bool ret = false;

    CTSVNPath p(path);
    do
    {
        CTSVNPath dbPath(p);
        dbPath.AppendPathString(g_SVNAdminDir.GetAdminDirName() + L"\\wc.db");
        if (!dbPath.Exists())
            p = p.GetContainingDirectory();
        else
        {
            AutoLocker lock(m_NoWatchPathCritSec);
            std::map<CTSVNPath, ULONGLONG>::iterator it = m_NoWatchPaths.find(p);
            if (it != m_NoWatchPaths.end())
            {
                CTraceToOutputDebugString::Instance()(_T(__FUNCTION__) L": path removed from no good: %s\n", it->first.GetWinPath());
                m_NoWatchPaths.erase(it);
                ret = true;
            }
            break;
        }
    } while (!p.IsEmpty());

    AutoLocker lock(m_NoWatchPathCritSec);
    std::map<CTSVNPath, ULONGLONG>::iterator it = m_NoWatchPaths.find(path.GetDirectory());
    if (it != m_NoWatchPaths.end())
    {
        CTraceToOutputDebugString::Instance()(_T(__FUNCTION__) L": path removed from no good: %s\n", it->first.GetWinPath());
        m_NoWatchPaths.erase(it);
        ret = true;
    }
    AddFolderForCrawling(path.GetDirectory());

    return ret;
}