本文整理汇总了C++中SVN::GetLogCachePool方法的典型用法代码示例。如果您正苦于以下问题:C++ SVN::GetLogCachePool方法的具体用法?C++ SVN::GetLogCachePool怎么用?C++ SVN::GetLogCachePool使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SVN
的用法示例。
在下文中一共展示了SVN::GetLogCachePool方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateFullHistory
void CRevisionGraphDlg::UpdateFullHistory()
{
m_Graph.SetDlgTitle (false);
SVN svn;
LogCache::CRepositoryInfo& cachedProperties
= svn.GetLogCachePool()->GetRepositoryInfo();
CString root = m_Graph.m_state.GetRepositoryRoot();
CString uuid = m_Graph.m_state.GetRepositoryUUID();
cachedProperties.ResetHeadRevision (uuid, root);
m_bFetchLogs = true;
StartWorkerThread();
}
示例2: OnBnClickedExport
void CSettingsLogCaches::OnBnClickedExport()
{
TRepo repo = GetSelectedRepo();
if (!repo.first.IsEmpty())
{
CString path;
if (CAppUtils::FileOpenSave(path, NULL, IDS_SETTINGS_LOGCACHE_EXPORT, IDS_LOGCACHE_EXPORTFILTER, false, CString(), GetSafeHwnd()))
{
SVN svn;
CCachedLogInfo* cache
= svn.GetLogCachePool()->GetCache (repo.second, repo.first);
CCSVWriter writer;
writer.Write(*cache, (LPCTSTR)path);
}
}
}
示例3: FillRepositoryList
void CSettingsLogCaches::FillRepositoryList()
{
int count = m_cRepositoryList.GetItemCount();
while (count > 0)
m_cRepositoryList.DeleteItem (--count);
SVN svn;
CLogCachePool* caches = svn.GetLogCachePool();
repos = caches->GetRepositoryURLs();
for (IT iter = repos.begin(), end = repos.end(); iter != end; ++iter, ++count)
{
CString url = iter->first;
m_cRepositoryList.InsertItem (count, url);
size_t fileSize = caches->FileSize (iter->second, url) / 1024;
CString sizeText;
sizeText.Format(L"%Iu", fileSize);
m_cRepositoryList.SetItemText (count, 1, sizeText);
}
}
示例4: WorkerThread
UINT CSettingsLogCaches::WorkerThread(LPVOID pVoid)
{
CCrashReportThread crashthread;
CSettingsLogCaches* dialog = (CSettingsLogCaches*)pVoid;
InterlockedExchange(&dialog->m_bThreadRunning, TRUE);
CoInitialize (NULL);
dialog->DialogEnableWindow(IDC_CACHEUPDATE, false);
dialog->progress = new CProgressDlg();
dialog->progress->SetTitle(IDS_SETTINGS_LOGCACHE_UPDATETITLE);
dialog->progress->SetCancelMsg(IDS_REVGRAPH_PROGCANCEL);
dialog->progress->SetTime();
dialog->progress->ShowModeless(dialog->m_hWnd);
// we have to get the log from the repository root
SVN svn;
svn.SetPromptParentWindow(dialog->GetSafeHwnd());
CLogCachePool* caches = svn.GetLogCachePool();
CRepositoryInfo& info = caches->GetRepositoryInfo();
TRepo repo = dialog->GetSelectedRepo();
CTSVNPath urlpath;
urlpath.SetFromSVN (repo.first);
dialog->headRevision = info.GetHeadRevision (repo.second, urlpath);
dialog->progress->SetProgress (0, dialog->headRevision);
apr_pool_t *pool = svn_pool_create(NULL);
try
{
CSVNLogQuery svnQuery (svn.GetSVNClientContext(), pool);
CCacheLogQuery query (caches, &svnQuery);
query.Log ( CTSVNPathList (urlpath)
, dialog->headRevision
, dialog->headRevision
, SVNRev(0)
, 0
, false // strictNodeHistory
, dialog
, true // includeChanges
, false // includeMerges
, true // includeStandardRevProps
, true // includeUserRevProps
, TRevPropNames());
}
catch (SVNError&)
{
}
caches->Flush();
svn_pool_destroy (pool);
if (dialog->progress)
{
dialog->progress->Stop();
delete dialog->progress;
dialog->progress = NULL;
}
CoUninitialize();
dialog->PostMessage (WM_REFRESH_REPOSITORYLIST);
dialog->DialogEnableWindow(IDC_CACHEUPDATE, true);
InterlockedExchange(&dialog->m_bThreadRunning, FALSE);
return 0;
}