本文整理汇总了C++中CCachedDirectory::UpdateChildDirectoryStatus方法的典型用法代码示例。如果您正苦于以下问题:C++ CCachedDirectory::UpdateChildDirectoryStatus方法的具体用法?C++ CCachedDirectory::UpdateChildDirectoryStatus怎么用?C++ CCachedDirectory::UpdateChildDirectoryStatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCachedDirectory
的用法示例。
在下文中一共展示了CCachedDirectory::UpdateChildDirectoryStatus方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateCurrentStatus
// Update our composite status and deal with things if it's changed
void CCachedDirectory::UpdateCurrentStatus()
{
svn_wc_status_kind newStatus = CalculateRecursiveStatus();
if ((newStatus != m_currentFullStatus)&&(m_ownStatus.IsVersioned()))
{
if ((m_currentFullStatus != svn_wc_status_none)&&(m_ownStatus.GetEffectiveStatus() != svn_wc_status_ignored))
{
// Our status has changed - tell the shell
CTraceToOutputDebugString::Instance()(_T(__FUNCTION__) _T(": Dir %s, status change from %d to %d\n"), m_directoryPath.GetWinPath(), m_currentFullStatus, newStatus);
CSVNStatusCache::Instance().UpdateShell(m_directoryPath);
}
if (m_ownStatus.GetEffectiveStatus() != svn_wc_status_ignored)
m_currentFullStatus = newStatus;
else
m_currentFullStatus = svn_wc_status_ignored;
}
// And tell our parent, if we've got one...
// we tell our parent *always* about our status, even if it hasn't
// changed. This is to make sure that the parent has really our current
// status - the parent can decide itself if our status has changed
// or not.
CTSVNPath parentPath = m_directoryPath.GetContainingDirectory();
if(!parentPath.IsEmpty())
{
CCachedDirectory * cachedDir = CSVNStatusCache::Instance().GetDirectoryCacheEntry(parentPath);
if (cachedDir)
cachedDir->UpdateChildDirectoryStatus(m_directoryPath, m_currentFullStatus);
}
}
示例2: UpdateCurrentStatus
// Update our composite status and deal with things if it's changed
void CCachedDirectory::UpdateCurrentStatus()
{
git_wc_status_kind newStatus = CalculateRecursiveStatus();
CTraceToOutputDebugString::Instance()(_T(__FUNCTION__) _T(": UpdateCurrentStatus %s new:%d old: %d\n"),
m_directoryPath.GetWinPath(),
newStatus, m_currentFullStatus);
if (newStatus != m_currentFullStatus && m_ownStatus.IsDirectory())
{
m_currentFullStatus = newStatus;
// Our status has changed - tell the shell
CTraceToOutputDebugString::Instance()(_T(__FUNCTION__) _T(": Dir %s, status change from %d to %d\n"), m_directoryPath.GetWinPath(), m_currentFullStatus, newStatus);
CGitStatusCache::Instance().UpdateShell(m_directoryPath);
}
// And tell our parent, if we've got one...
// we tell our parent *always* about our status, even if it hasn't
// changed. This is to make sure that the parent has really our current
// status - the parent can decide itself if our status has changed
// or not.
CTGitPath parentPath = m_directoryPath.GetContainingDirectory();
if(!parentPath.IsEmpty())
{
// We have a parent
// just version controled directory need to cache.
CString root1, root2;
if (parentPath.HasAdminDir(&root1) && (CGitStatusCache::Instance().IsRecurseSubmodules() || m_directoryPath.HasAdminDir(&root2) && root1 == root2))
{
CCachedDirectory * cachedDir = CGitStatusCache::Instance().GetDirectoryCacheEntry(parentPath);
if (cachedDir)
cachedDir->UpdateChildDirectoryStatus(m_directoryPath, m_currentFullStatus);
}
}
}
示例3: UpdateCurrentStatus
// Update our composite status and deal with things if it's changed
void CCachedDirectory::UpdateCurrentStatus()
{
git_wc_status_kind newStatus = CalculateRecursiveStatus();
ATLTRACE(_T("UpdateCurrentStatus %s new:%d old: %d\n"),
m_directoryPath.GetWinPath(),
newStatus, m_currentFullStatus);
if ( this->m_ownStatus.GetEffectiveStatus() < git_wc_status_normal )
{
if (::PathFileExists(this->m_directoryPath.GetWinPathString()+_T("\\.git")))
{
//project root must be normal status at least.
ATLTRACE(_T("force update project root directory as normal status\n"));
this->m_ownStatus.ForceStatus(git_wc_status_normal);
}
}
if ((newStatus != m_currentFullStatus) && m_ownStatus.IsVersioned())
{
if ((m_currentFullStatus != git_wc_status_none)&&(m_ownStatus.GetEffectiveStatus() != git_wc_status_missing))
{
// Our status has changed - tell the shell
ATLTRACE(_T("Dir %s, status change from %d to %d, send shell notification\n"), m_directoryPath.GetWinPath(), m_currentFullStatus, newStatus);
CGitStatusCache::Instance().UpdateShell(m_directoryPath);
}
if (m_ownStatus.GetEffectiveStatus() != git_wc_status_missing)
m_currentFullStatus = newStatus;
else
m_currentFullStatus = git_wc_status_missing;
}
// And tell our parent, if we've got one...
// we tell our parent *always* about our status, even if it hasn't
// changed. This is to make sure that the parent has really our current
// status - the parent can decide itself if our status has changed
// or not.
CTGitPath parentPath = m_directoryPath.GetContainingDirectory();
if(!parentPath.IsEmpty())
{
// We have a parent
// just version controled directory need to cache.
CString root1, root2;
if(parentPath.HasAdminDir(&root1) && m_directoryPath.HasAdminDir(&root2) && root1 == root2)
{
CCachedDirectory * cachedDir = CGitStatusCache::Instance().GetDirectoryCacheEntry(parentPath);
if (cachedDir)
cachedDir->UpdateChildDirectoryStatus(m_directoryPath, m_currentFullStatus);
}
}
}